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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">iu_client: introduce ranap_iu_free_ue() to free the UE connections<br><br>When freeing the UE connection object, disconnect the SCCP connection.<br><br>Change-Id: I6812edb4da487507ccf9f483de801c1c65c4b72b<br>---<br>M include/osmocom/ranap/iu_client.h<br>M src/iu_client.c<br>2 files changed, 14 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/ranap/iu_client.h b/include/osmocom/ranap/iu_client.h</span><br><span>index 873b2d2..0cb84da 100644</span><br><span>--- a/include/osmocom/ranap/iu_client.h</span><br><span>+++ b/include/osmocom/ranap/iu_client.h</span><br><span>@@ -70,5 +70,9 @@</span><br><span> int ranap_iu_tx_common_id(struct ranap_ue_conn_ctx *ue_ctx, const char *imsi);</span><br><span> int ranap_iu_tx_release(struct ranap_ue_conn_ctx *ctx, const struct RANAP_Cause *cause);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* freeing the UE will release all resources</span><br><span style="color: hsl(120, 100%, 40%);">+ * This will close the SCCP connection connected to the UE */</span><br><span style="color: hsl(120, 100%, 40%);">+void ranap_iu_free_ue(struct ranap_ue_conn_ctx *ue_ctx);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> void ranap_iu_vty_init(int iu_parent_node, enum ranap_nsap_addr_enc *rab_assign_addr_enc);</span><br><span> int ranap_iu_vty_config_write(struct vty *vty, const char *indent);</span><br><span>diff --git a/src/iu_client.c b/src/iu_client.c</span><br><span>index ce06f8a..c7ed341 100644</span><br><span>--- a/src/iu_client.c</span><br><span>+++ b/src/iu_client.c</span><br><span>@@ -131,6 +131,16 @@</span><br><span>   return NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+void ranap_iu_free_ue(struct ranap_ue_conn_ctx *ue_ctx)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+     if (!ue_ctx)</span><br><span style="color: hsl(120, 100%, 40%);">+          return;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     osmo_sccp_tx_disconn(g_scu, ue_ctx->conn_id, NULL, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+     llist_del(&ue_ctx->list);</span><br><span style="color: hsl(120, 100%, 40%);">+      talloc_free(ue_ctx);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct osmo_sccp_addr *addr)</span><br><span> {</span><br><span>     struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct ranap_iu_rnc);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-iuh/+/15161">change 15161</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/+/15161"/><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: I6812edb4da487507ccf9f483de801c1c65c4b72b </div>
<div style="display:none"> Gerrit-Change-Number: 15161 </div>
<div style="display:none"> Gerrit-PatchSet: 10 </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: daniel <dwillmann@sysmocom.de> </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-MessageType: merged </div>