aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gmm.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index d734df01..f32854d7 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -120,7 +120,10 @@ int sgsn_ranap_iu_event(struct ue_conn_ctx *ctx, enum iu_event_type type, void *
/* fall thru */
case IU_EVENT_LINK_INVALIDATED:
/* Clean up ue_conn_ctx here */
- LOGMMCTXP(LOGL_INFO, mm, "IU release\n");
+ LOGMMCTXP(LOGL_INFO, mm, "IU release for imsi %s\n", mm->imsi);
+ if (mm->pmm_state == PMM_CONNECTED)
+ mm->pmm_state = PMM_IDLE;
+
rc = 0;
break;
case IU_EVENT_SECURITY_MODE_COMPLETE:
@@ -217,6 +220,7 @@ static void mm_ctx_cleanup_free(struct sgsn_mm_ctx *ctx, const char *log_text)
/* Mark MM state as deregistered */
ctx->mm_state = GMM_DEREGISTERED;
+ ctx->pmm_state = PMM_DETACHED;
sgsn_mm_ctx_cleanup_free(ctx);
}
@@ -802,7 +806,7 @@ static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx)
case GSM48_MT_GMM_SERVICE_REQ:
/* TODO: PMM State transition */
ctx->pending_req = 0;
-
+ ctx->pmm_state = PMM_CONNECTED;
rc = gsm48_tx_gmm_service_ack(ctx);
if (ctx->iu.service.type == 1) {
@@ -1714,6 +1718,7 @@ static int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
GPRS_ALGO_GEA0, NULL);
}
mmctx->mm_state = GMM_REGISTERED_NORMAL;
+ mmctx->pmm_state = PMM_CONNECTED;
rc = 0;
memset(&sig_data, 0, sizeof(sig_data));
@@ -1734,6 +1739,7 @@ static int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
GPRS_ALGO_GEA0, NULL);
}
mmctx->mm_state = GMM_REGISTERED_NORMAL;
+ mmctx->pmm_state = PMM_CONNECTED;
activate_pdp_rabs(mmctx);
rc = 0;