<p><a href="https://gerrit.osmocom.org/11493">View Change</a></p><p>5 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/11493/1/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/11493/1/src/osmo-bsc/bsc_vty.c@544">Patch Set #1, Line 544:</a> <code style="font-family:monospace,monospace">show rejected</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I think in terms of naming this needs to be further qualified. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/11493/1/src/osmo-bsc/bsc_vty.c@562">Patch Set #1, Line 562:</a> <code style="font-family:monospace,monospace">               char buf[20];</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">is this okay since this is in a different scope, or should buf also be declared on top of the function?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/11493/1/src/osmo-bsc/bts_ipaccess_nanobts.c">File src/osmo-bsc/bts_ipaccess_nanobts.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/11493/1/src/osmo-bsc/bts_ipaccess_nanobts.c@475">Patch Set #1, Line 475:</a> <code style="font-family:monospace,monospace">64</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I've seen this magic number appearing two times now. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I have copy pasted the 64 from osmo_sock_get_name() without thinking too much about it. Turns out, the right constant to use would be INET6_ADDRSTRLEN (46).</p><p style="white-space: pre-wrap; word-wrap: break-word;">If you want, I can make a patch for libosmocore that uses INET6_ADDRSTRLEN there instead of the 64. Also the right number for the port string length would be 6 (as 65535 is the highest allowed port number). Right now, the code has portbuf[16] - should we introduce a #define for that (there isn't one in POSIX like INET6_ADDRSTRLEN for ports)?</p><p style="white-space: pre-wrap; word-wrap: break-word;">You've introduced both magic numbers here:<br>https://git.osmocom.org/libosmocore/commit/?id=48f55833476439fc45fa4eaa4327beccdc92d44b</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/11493/1/src/osmo-bsc/bts_ipaccess_nanobts.c@480">Patch Set #1, Line 480:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">struct gsm_bts_rejected *entry = NULL;<br>   struct gsm_bts_rejected *pos;<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">same for those variables, they should be at the top of the block. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/11493/1/src/osmo-bsc/bts_ipaccess_nanobts.c@506">Patch Set #1, Line 506:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">llist_for_each_entry(pos, &bsc_gsmnet->bts_rejected, list) {<br>         if (i >= 25)<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">we do have llist_count() to count the number of entries. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/11493">change 11493</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/11493"/><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: Iba3bfe8fc9432b7ae8f819df8bd71b35b3ec507e </div>
<div style="display:none"> Gerrit-Change-Number: 11493 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </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: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 30 Oct 2018 13:04:24 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>