<p style="white-space: pre-wrap; word-wrap: break-word;">In terms of layering, the e1inp_sign_link_name() function should becom part of libosmo-abis.  This way it's generic and can be used by whatever application to get a string representation of whatever signaling link.</p><p><a href="https://gerrit.osmocom.org/11290">View Change</a></p><p>3 comments:</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><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><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.  This can then be used from a printf / vty_out() statement.</p></li><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@296">Patch Set #3, Line 296:</a> <code style="font-family:monospace,monospace">static void e1isl_dump_vty_tcp(struct vty *vty, struct e1inp_sign_link *e1l)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">this argument is read-only, so it should be 'const struct e1inp_sign_link *'</p></li><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@298">Patch Set #3, Line 298:</a> <code style="font-family:monospace,monospace">  if(e1l) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">if is not a function, hence we use a space.</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: 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-CC: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 10 Oct 2018 10:12:34 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>