<p style="white-space: pre-wrap; word-wrap: break-word;">Thanks for the review!</p><p><a href="https://gerrit.osmocom.org/11290">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/11290/3/src/osmo-bsc/bsc_vty.c">File src/osmo-bsc/bsc_vty.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/11290/3/src/osmo-bsc/bsc_vty.c@293">Patch Set #3, Line 293:</a> <code style="font-family:monospace,monospace">/*! Dump the IP addresses and ports of the input signal link's timeslot.</code></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I suggest to have a function like e1inp_sign_link_name(const struct e1inp_sign_link *e1l) which will simply return an empty string or "<none>" if the e1l is NULL. </p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Done: https://gerrit.osmocom.org/#/c/libosmo-abis/+/11294/</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">in therm of API design, I don't think it makes sense to have a separate 'dump' function here, particularly not one that includes the newline at the end.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">This function was closely modeled after "e1isl_dump_vty()" above, which also outputs new lines at the end.</p><p style="white-space: pre-wrap; word-wrap: break-word;">With the libosmo-abis patch linked above, the e1isl_dump_vty_tcp() function can be replaced with the following (tested and working):</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">```<br>static void e1isl_dump_vty_tcp(struct vty *vty, const struct e1inp_sign_link *e1l)<br>{<br> char *name = e1inp_sign_link_name(e1l);<br>       vty_out(vty, "%s%s", name, VTY_NEWLINE);<br>    talloc_free(name);<br>}<br>```</pre><p style="white-space: pre-wrap; word-wrap: break-word;">As we still need to free the result of e1inp_sign_link_name(), we save some redundancy if we put these three lines into a function (it gets called two times below). But if you prefer I could instead remove e1isl_dump_vty_tcp() and directly use these three lines where the function would have been called.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/11290">change 11290</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11290"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I37f020fcdb68cafcdbdb621808483d1dd996354f </div>
<div style="display:none"> Gerrit-Change-Number: 11290 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 10 Oct 2018 12:26:00 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>