<p style="white-space: pre-wrap; word-wrap: break-word;">It works and the code looks sane; but after refactoring these things in osmo-msc, I would prefer to have an FSM instance instead of "manual timers". FSMs are for me the shiny new and better way to manage timeouts and async events, and setting up timers is more like the old and weird way.</p><p style="white-space: pre-wrap; word-wrap: break-word;">If it were me, I would sooner or later adopt similar FSM layering as in osmo-msc, like sccp_ran (SCCP conn state), ran_peer (hnb/PCU peer state), and a subscriber FSM (msc_i/msc_a transposed to the SGSN land). Whichever layer needs to wait for a release can then just stick around until the message came in or a timeout has passed.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I accept that it would be more work than tweaking the current code base, but I expect it to pay off in the long run.</p><p style="white-space: pre-wrap; word-wrap: break-word;">That would be my recommendation, but I leave it up to you.</p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #d4ffd4;">Code-Review +1</span></p><p><a href="https://gerrit.osmocom.org/c/osmo-iuh/+/15473">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/15473/1/include/osmocom/ranap/iu_client.h">File include/osmocom/ranap/iu_client.h:</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/15473/1/include/osmocom/ranap/iu_client.h@81">Patch Set #1, Line 81:</a> <code style="font-family:monospace,monospace">                        int timeout);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">indent off-by-one</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/15473/1/src/iu_client.c">File src/iu_client.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/15473/1/src/iu_client.c@134">Patch Set #1, Line 134:</a> <code style="font-family:monospace,monospace">                  ctx);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">indent off-by-one</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/15473/1/src/iu_client.c@500">Patch Set #1, Line 500:</a> <code style="font-family:monospace,monospace">                          int timeout)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">indent</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-iuh/+/15473">change 15473</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-iuh/+/15473"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-iuh </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I349e2c61ba0131e233b7ab927dfced0bd461dd8f </div>
<div style="display:none"> Gerrit-Change-Number: 15473 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 11 Sep 2019 12:23:47 +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>