diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-11-11 14:47:38 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-12-09 09:48:25 +0100 |
commit | 98647ca0ef59430f3cd7ddb7530d85db7fa2688f (patch) | |
tree | c4676ca922ee92c013d5ee9be406f4624851bed4 /openbsc/src/gprs/gprs_gmm.c | |
parent | be2c8d9358084092281e7d02dc7ae0b7e4c0b4f8 (diff) |
sgsn: Add gsm0408_gprs_access_cancelled
This function is called to delete an established MM context
silently without invoking a detach procedure.
It is called when a subscriber is cancelled by the HLR. This
generally happens, when an MS has moved to another routing area and
has to use another SGSN.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r-- | openbsc/src/gprs/gprs_gmm.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 60a17ce95..4f19454a6 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -756,6 +756,33 @@ void gsm0408_gprs_access_denied(struct sgsn_mm_ctx *ctx) } } +void gsm0408_gprs_access_cancelled(struct sgsn_mm_ctx *ctx) +{ + switch (ctx->mm_state) { +#if 0 + case GMM_COMMON_PROC_INIT: + LOGP(DMM, LOGL_NOTICE, + "Cancelled, rejecting ATTACH REQUEST, IMSI=%s\n", + ctx->imsi); + gsm48_tx_gmm_att_rej(ctx, GMM_CAUSE_IMPL_DETACHED); + break; + case GMM_REGISTERED_NORMAL: + case GMM_REGISTERED_SUSPENDED: + LOGP(DMM, LOGL_NOTICE, + "Cancelled, detaching, IMSI=%s\n", + ctx->imsi); + gsm48_tx_gmm_detach_req( + ctx, GPRS_DET_T_MT_REATT_NOTREQ, GMM_CAUSE_IMPL_DETACHED); + break; +#endif + default: + LOGP(DMM, LOGL_INFO, + "Cancelled, deleting context, IMSI=%s\n", + ctx->imsi); + } + mm_ctx_cleanup_free(ctx, "access cancelled"); +} + /* Parse Chapter 9.4.13 Identity Response */ static int gsm48_rx_gmm_id_resp(struct sgsn_mm_ctx *ctx, struct msgb *msg) { |