summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-04-10 01:47:54 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-04-19 22:11:39 +0200
commit95c9f296346d14e1362d95776b7339c02499610a (patch)
tree674ec288b55c36a4bfffe4398c403451ade76a00
parent30753e4a283398338f2eeabc5dbd11aaa1426276 (diff)
Iu RANAP event: add IU_EVENT_LINK_INVALIDATED
See in-code comment...
-rw-r--r--openbsc/include/openbsc/iu.h6
-rw-r--r--openbsc/src/gprs/gprs_gmm.c4
-rw-r--r--openbsc/src/osmo-cscn/iucs_ranap.c1
3 files changed, 8 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/iu.h b/openbsc/include/openbsc/iu.h
index 2f02dd017..b261cb0ed 100644
--- a/openbsc/include/openbsc/iu.h
+++ b/openbsc/include/openbsc/iu.h
@@ -15,8 +15,12 @@ struct ue_conn_ctx {
enum iu_event_type {
IU_EVENT_RAB_ASSIGN,
- IU_EVENT_IU_RELEASE,
IU_EVENT_SECURITY_MODE_COMPLETE,
+ IU_EVENT_IU_RELEASE, /* An actual Iu Release message was received */
+ IU_EVENT_LINK_INVALIDATED, /* A SUA link was lost or closed down */
+ /* FIXME: maybe IU_EVENT_IU_RELEASE and IU_EVENT_LINK_INVALIDATED
+ * should be combined to one generic event that simply means the
+ * ue_conn_ctx should no longer be used, for whatever reason. */
};
/* Implementations of iu_recv_cb_t shall find the ue_conn_ctx in msg->dst. */
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index b054a936d..40e0f2284 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -115,11 +115,11 @@ int sgsn_ranap_iu_event(struct ue_conn_ctx *ctx, enum iu_event_type type, void *
rc = sgsn_ranap_rab_ass_resp(mm, (RANAP_RAB_SetupOrModifiedItemIEs_t *)data);
break;
case IU_EVENT_IU_RELEASE:
- {
+ /* fall thru */
+ case IU_EVENT_LINK_INVALIDATED:
/* Clean up ue_conn_ctx here */
LOGMMCTXP(LOGL_INFO, mm, "IU release\n");
rc = 0;
- }
break;
case IU_EVENT_SECURITY_MODE_COMPLETE:
/* Continue authentication here */
diff --git a/openbsc/src/osmo-cscn/iucs_ranap.c b/openbsc/src/osmo-cscn/iucs_ranap.c
index 078783f12..5db29c29e 100644
--- a/openbsc/src/osmo-cscn/iucs_ranap.c
+++ b/openbsc/src/osmo-cscn/iucs_ranap.c
@@ -88,6 +88,7 @@ int iucs_rx_ranap_event(struct gsm_network *network,
switch (type) {
case IU_EVENT_IU_RELEASE:
+ case IU_EVENT_LINK_INVALIDATED:
LOGP(DIUCS, LOGL_INFO, "IuCS release for %s\n",
subscr_name(conn->subscr));
msc_subscr_con_free(conn);