Change in ...osmo-sgsn[master]: gprs_ranap: release Iu UE Context when exiting PMM Connected

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Wed Sep 11 01:41:45 UTC 2019


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15482


Change subject: gprs_ranap: release Iu UE Context when exiting PMM Connected
......................................................................

gprs_ranap: release Iu UE Context when exiting PMM Connected

PMM Connected defines a Iu signaling connection. The 2 other
PMM states do not have an active Iu signaling connection.

Change-Id: Ie05d2bdf8dfb593b4c7e837107a3a06f22e90119
---
M src/sgsn/gprs_mm_state_iu_fsm.c
M src/sgsn/gprs_ranap.c
2 files changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/82/15482/1

diff --git a/src/sgsn/gprs_mm_state_iu_fsm.c b/src/sgsn/gprs_mm_state_iu_fsm.c
index 1ed5f56..b098f20 100644
--- a/src/sgsn/gprs_mm_state_iu_fsm.c
+++ b/src/sgsn/gprs_mm_state_iu_fsm.c
@@ -6,6 +6,7 @@
 
 #include <osmocom/sgsn/debug.h>
 #include <osmocom/sgsn/sgsn.h>
+#include <osmocom/sgsn/gprs_ranap.h>
 
 #define X(s) (1 << (s))
 
@@ -45,11 +46,15 @@
 
 static void st_pmm_connected(struct osmo_fsm_inst *fi, uint32_t event, void *data)
 {
+	struct sgsn_mm_ctx *ctx = fi->priv;
+
 	switch(event) {
 	case E_PMM_PS_CONN_RELEASE:
+		sgsn_ranap_iu_free(ctx);
 		mm_state_iu_fsm_state_chg(fi, ST_PMM_IDLE);
 		break;
 	case E_PMM_IMPLICIT_DETACH:
+		sgsn_ranap_iu_release_free(ctx, NULL);
 		mm_state_iu_fsm_state_chg(fi, ST_PMM_DETACHED);
 		break;
 	case E_PMM_RA_UPDATE:
diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index 2d2bdc5..620383f 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -122,6 +122,7 @@
 	mm = sgsn_mm_ctx_by_ue_ctx(ctx);
 	if (!mm) {
 		LOGIUP(ctx, LOGL_NOTICE, "Cannot find mm ctx for IU event %d\n", type);
+		ranap_iu_free_ue(ctx);
 		return rc;
 	}
 
@@ -134,7 +135,11 @@
 	case RANAP_IU_EVENT_LINK_INVALIDATED:
 		/* Clean up ranap_ue_conn_ctx here */
 		LOGMMCTXP(LOGL_INFO, mm, "IU release for imsi %s\n", mm->imsi);
-		osmo_fsm_inst_dispatch(mm->iu.mm_state_fsm, E_PMM_PS_CONN_RELEASE, NULL);
+		if (mm->iu.mm_state_fsm->state == ST_PMM_CONNECTED)
+			osmo_fsm_inst_dispatch(mm->iu.mm_state_fsm, E_PMM_PS_CONN_RELEASE, NULL);
+		else
+			sgsn_ranap_iu_free(mm);
+
 		rc = 0;
 		break;
 	case RANAP_IU_EVENT_SECURITY_MODE_COMPLETE:

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15482
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ie05d2bdf8dfb593b4c7e837107a3a06f22e90119
Gerrit-Change-Number: 15482
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190911/eb03f465/attachment.htm>


More information about the gerrit-log mailing list