aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-08-13 17:42:50 +0200
committerAlexander Couzens <lynxis@fe80.eu>2019-09-03 18:44:34 +0200
commitefdd80dc0ad218a5a5e02898e8993c69ed020098 (patch)
treed00512d08b583e93208208dd3b6bf32cecc26766 /src
parent609994d1468af27d0af4427e6b57df580fc80a7a (diff)
iu_client: emit RANAP_IU_EVENT_LINK_INVALIDATED on SCCP disconnect indication
Diffstat (limited to 'src')
-rw-r--r--src/iu_client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/iu_client.c b/src/iu_client.c
index c7ed341..7a0a78e 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -812,6 +812,13 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu)
rc = 0;
if (msgb_l2len(oph->msg) > 0)
rc = ranap_cn_rx_co(cn_ranap_handle_co, ue, msgb_l2(oph->msg), msgb_l2len(oph->msg));
+
+ /* A Iu Release event might be used to free the UE in cn_ranap_handle_co. */
+ ue = ue_conn_ctx_find(prim->u.disconnect.conn_id);
+ if (!ue)
+ break;
+
+ global_iu_event_cb(ue, RANAP_IU_EVENT_LINK_INVALIDATED, NULL);
break;
case OSMO_PRIM(OSMO_SCU_PRIM_N_DATA, PRIM_OP_INDICATION):
/* connection-oriented data received */