<p style="white-space: pre-wrap; word-wrap: break-word;">nice!</p><p>Patch set 1:<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/c/osmo-sgsn/+/15214">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/15214/1/src/gprs/gprs_gmm.c">File src/gprs/gprs_gmm.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/15214/1/src/gprs/gprs_gmm.c@475">Patch Set #1, Line 475:</a> <code style="font-family:monospace,monospace"> t = osmo_tdef_get(sgsn->cfg.T_defs, 3312, OSMO_TDEF_S, -1);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Hmm, I just notice a flaw in the osmo_tdef() API.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The val_if_not_present argument is an unsigned long, and I see -1 explicitly in the API docs, indicating that a negative value causes a program abort if no timer is found. That is in fact not possible with an unsigned long arg.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I created https://osmocom.org/issues/4152 for this.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/15214/1/src/gprs/gprs_gmm_attach.c">File src/gprs/gprs_gmm_attach.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/15214/1/src/gprs/gprs_gmm_attach.c@15">Patch Set #1, Line 15:</a> <code style="font-family:monospace,monospace">static const struct osmo_tdef_state_timeout gmm_attach_fsm_timeouts[] = {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">-1: you *have* to explicitly use an array size of [32] to be safe. See osmo_tdef_get_state_timeout() API doc.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/15214">change 15214</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-sgsn/+/15214"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia0cf5f0a49737fbc419e2ccc86312d01c6e0056e </div>
<div style="display:none"> Gerrit-Change-Number: 15214 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 15 Aug 2019 00:18:34 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>