<p>lynxis lazus <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-iuh/+/15474">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">iu_client: introduce UE field free_on_release<br><br>Allow to free UE ctx when receiving a Iu Release Complete.<br>In preparation of ranap_iu_tx_release_free() it requires<br>a field to free the Iu ctx on it's own without depending<br>on the upstream user.<br><br>Change-Id: Iac41cd3cce3232d01b2f7ede0cc46226c2cfb6c0<br>---<br>M TODO-RELEASE<br>M include/osmocom/ranap/iu_client.h<br>M src/iu_client.c<br>3 files changed, 12 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/TODO-RELEASE b/TODO-RELEASE</span><br><span>index bcbf5de..b967e56 100644</span><br><span>--- a/TODO-RELEASE</span><br><span>+++ b/TODO-RELEASE</span><br><span>@@ -9,3 +9,4 @@</span><br><span> #library  what            description / commit summary line</span><br><span> libranap    iu_client.h struct ranap_ue_conn_ctx: add field notification</span><br><span> libranap    iu_client.h struct ranap_ue_conn_ctx: add field release_timeout</span><br><span style="color: hsl(120, 100%, 40%);">+libranap    iu_client.h struct ranap_ue_conn_ctx: add field free_on_release</span><br><span>diff --git a/include/osmocom/ranap/iu_client.h b/include/osmocom/ranap/iu_client.h</span><br><span>index a93fff3..24a5af9 100644</span><br><span>--- a/include/osmocom/ranap/iu_client.h</span><br><span>+++ b/include/osmocom/ranap/iu_client.h</span><br><span>@@ -31,6 +31,8 @@</span><br><span>       struct gprs_ra_id ra_id;</span><br><span>     enum ranap_nsap_addr_enc rab_assign_addr_enc;</span><br><span>        bool notification; /* send notification to the upstream user */</span><br><span style="color: hsl(120, 100%, 40%);">+       /* if true the ue_ctx will be free on Iu release complete */</span><br><span style="color: hsl(120, 100%, 40%);">+  bool free_on_release;</span><br><span>        /* Will be set when the Iu Release Command has been sent */</span><br><span>  struct osmo_timer_list release_timeout;</span><br><span> };</span><br><span>diff --git a/src/iu_client.c b/src/iu_client.c</span><br><span>index e4eb83e..c309ce4 100644</span><br><span>--- a/src/iu_client.c</span><br><span>+++ b/src/iu_client.c</span><br><span>@@ -129,6 +129,7 @@</span><br><span>         ctx->rnc = rnc;</span><br><span>   ctx->conn_id = conn_id;</span><br><span>   ctx->notification = true;</span><br><span style="color: hsl(120, 100%, 40%);">+  ctx->free_on_release = false;</span><br><span>     osmo_timer_setup(&ctx->release_timeout,</span><br><span>                        (void *)(void *) ranap_iu_free_ue,</span><br><span>                   ctx);</span><br><span>@@ -500,6 +501,7 @@</span><br><span>                              int timeout)</span><br><span> {</span><br><span>       ctx->notification = false;</span><br><span style="color: hsl(120, 100%, 40%);">+ ctx->free_on_release = true;</span><br><span>      int ret = ranap_iu_tx_release(ctx, cause);</span><br><span>   if (ret) {</span><br><span>           ranap_iu_free_ue(ctx);</span><br><span>@@ -851,6 +853,13 @@</span><br><span>                        break;</span><br><span> </span><br><span>           global_iu_event(ue, RANAP_IU_EVENT_LINK_INVALIDATED, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+         /* A RANAP_IU_EVENT_LINK_INVALIDATED, can lead to a free */</span><br><span style="color: hsl(120, 100%, 40%);">+           ue = ue_conn_ctx_find(prim->u.disconnect.conn_id);</span><br><span style="color: hsl(120, 100%, 40%);">+         if (!ue)</span><br><span style="color: hsl(120, 100%, 40%);">+                      break;</span><br><span style="color: hsl(120, 100%, 40%);">+                if (ue->free_on_release)</span><br><span style="color: hsl(120, 100%, 40%);">+                   ranap_iu_free_ue(ue);</span><br><span>                break;</span><br><span>       case OSMO_PRIM(OSMO_SCU_PRIM_N_DATA, PRIM_OP_INDICATION):</span><br><span>            /* connection-oriented data received */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-iuh/+/15474">change 15474</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/+/15474"/><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: Iac41cd3cce3232d01b2f7ede0cc46226c2cfb6c0 </div>
<div style="display:none"> Gerrit-Change-Number: 15474 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </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: laforge <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>