<p>Patch set 4:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/12526">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/12526/4/src/hlr.c">File src/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/12526/4/src/hlr.c@442">Patch Set #4, Line 442:</a> <code style="font-family:monospace,monospace">             LOGP(DMAIN, LOGL_INFO, "%s: has IMEI: %s (consider setting 'store-imei 1')\n", gsup->imsi, imei);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">if the subscriber doesn't exist, we should respond with an error.<br>I'm not saying to implement an IMEI black/whitelist, but at least to error if the IMSI isn't known at all.<br>i.e. always first db_subscr_get_by_imsi().</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not sure if we need to optimize for db performance, but if we do, then this would be an obvious improvement:<br>To have less DB hits instead implement db_update_imei_by_imsi(), so that we check IMSI presence and update the IMEI in one DB hit. A returned value of zero modified rows would then mean "IMSI not known".</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12526/4/src/hlr_vty.c">File src/hlr_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/12526/4/src/hlr_vty.c@75">Patch Set #4, Line 75:</a> <code style="font-family:monospace,monospace">            vty_out(vty, "  store-imei 1%s", VTY_NEWLINE);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">looks like too much indent.<br>Add a vty test for this to one or other .vty transcript test, please (check output of 'show running-config')</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12526/4/src/hlr_vty.c@313">Patch Set #4, Line 313:</a> <code style="font-family:monospace,monospace">    " to set 'check-imei-rqd 1' in osmo-msc.cfg.\n"</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">wording: maybe rather "Note that an MSC does not necessarily send Check IMEI requests (for OsmoMSC, you may want to set 'check-imei-rqd 1')."</p><p style="white-space: pre-wrap; word-wrap: break-word;">consistency: AFAICT osmo-hlr so far uses only the 'foo' / 'no foo' syntax, so better also make this</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">   'store-imei'<br>   'no store-imei'</pre><p style="white-space: pre-wrap; word-wrap: break-word;">(<br>If you decide to keep (0|1), then the first doc should be general for switching it off or on:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  store-imei  Configure whether to store a received IMEI in the database.</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">    0   Do not store...<br>    1   Store received IMEIs. Note that an MSC does not necessarily send Check IMEI<br>        requests (for OsmoMSC, you may want to set 'check-imei-rqd 1').<br>)</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12526">change 12526</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/12526"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I09274ecbed64224f7ae305e09ede773931da2a57 </div>
<div style="display:none"> Gerrit-Change-Number: 12526 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </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: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 14 Jan 2019 17:00:33 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>