<p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311">View Change</a></p><p>7 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/db_hlr.c">File src/db_hlr.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/osmo-hlr/+/22311/7/src/db_hlr.c@629">Patch Set #7, Line 629:</a> <code style="font-family:monospace,monospace"> </code></p><p style="white-space: pre-wrap; word-wrap: break-word;">there is no  vty argument in below function</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/db_hlr.c@633">Patch Set #7, Line 633:</a> <code style="font-family:monospace,monospace"> </code></p><p style="white-space: pre-wrap; word-wrap: break-word;">it's now called get_cb? 'data' is missing.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c">File src/hlr_vty_subscr.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/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@232">Patch Set #7, Line 232:</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;">vty_out(vty, "-----  ------------  ----------------  ----------------  -----");<br>             if (show_ls)<br>                  vty_out(vty, "  ------------");<br>             vty_out_newline(vty);<br>         vty_out(vty, "ID     MSISDN        IMSI              IMEI              NAM");<br>               if (show_ls)<br>                  vty_out(vty, "    LAST SEEN");<br>              vty_out_newline(vty);<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">thisi s a repetition of the above.  I suggest you factor that "print header" into a separate function and call it from a few lines above and from here.  This way we don't have to edit two places if the table format ever changes.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@251">Patch Set #7, Line 251:</a> <code style="font-family:monospace,monospace">SUBSCR_SHOW_HELP</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">you could add the SHOW_STR inside the definition of SUBSCR_SHOW_HELP, so you don't have to repeat it at every DEFUN below.  However, you may intentionally not have wanted that, as the number of tokens/strings is harder to see?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@305">Patch Set #7, Line 305:</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;">SHOW_STR SUBSCRS_SHOW_HELP "Show summary of subscribers with filter\n"<br>      "Filter by IMSI\n" "Filter by MSISDN\n" "String to match in msisdn or imsi\n")<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">it's odd that the command syntax is hidden in a #define whle the help strings are not.  So it's hard to match both when looking at the code. Either use #defines for both and put them at the same location in the file, or list them explicitly here.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@320">Patch Set #7, Line 320:</a> <code style="font-family:monospace,monospace">     </code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Somehow the number of help strings doesn't match the number of tokens.  You need 6 strings, I see 5 and some don't make sense.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311/7/src/hlr_vty_subscr.c@323">Patch Set #7, Line 323:</a> <code style="font-family:monospace,monospace">last seen</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">if you do not expect other tokens after "last" (like "last created" or whatever), then please change to a single tokenm "last-seen".</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-hlr/+/22311">change 22311</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/c/osmo-hlr/+/22311"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7f0573381a6d0d13841ac6d42d50f0e8389decf4 </div>
<div style="display:none"> Gerrit-Change-Number: 22311 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 20 Jan 2021 16:20:03 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>