aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-08-24 16:04:26 +0200
committerAlexander Couzens <lynxis@fe80.eu>2019-08-24 16:04:26 +0200
commitd4c289652e66b25f5e2b3becd16b60e5ac67e57d (patch)
treed15871bf46aeb1bfbf85e06614c07ab3d63ad96d
parent736631aa7c50c338865f004c1ce4eeed8fc5828a (diff)
FIXNE: move mmctx_cleanup_utran() upwards
-rw-r--r--src/gprs/gprs_gmm.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index 438f01f2..d93d307b 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -465,6 +465,30 @@ static void mm_ctx_cleanup_free(struct sgsn_mm_ctx *ctx, const char *log_text)
sgsn_mm_ctx_cleanup_free(ctx);
}
+
+static void mmctx_cleanup_utran(struct sgsn_mm_ctx *mmctx)
+{
+ if (mmctx->ran_type != MM_CTX_T_UTRAN_Iu)
+ return;
+
+ if (mmctx->pmm_state == PMM_DETACHED)
+ return;
+
+ mmctx_set_pmm_state(mmctx, PMM_IDLE);
+ mmctx_set_pmm_state(mmctx, PMM_DETACHED);
+}
+
+static void mmctx_cleanup_geran(struct sgsn_mm_ctx *mmctx)
+{
+ if (mmctx->ran_type != MM_CTX_T_GERAN_Gb)
+ return;
+
+ if (mmctx->pmm_state == PMM_DETACHED)
+ return;
+
+ mmctx_set_mm_state(mmctx, MM_IDLE);
+}
+
/* Chapter 9.4.18 */
static int _tx_status(struct msgb *msg, uint8_t cause,
struct sgsn_mm_ctx *mmctx, int sm)
@@ -1771,29 +1795,6 @@ bool pdp_status_has_active_nsapis(const uint8_t *pdp_status, const size_t pdp_st
return false;
}
-static void mmctx_cleanup_utran(struct sgsn_mm_ctx *mmctx)
-{
- if (mmctx->ran_type != MM_CTX_T_UTRAN_Iu)
- return;
-
- if (mmctx->pmm_state == PMM_DETACHED)
- return;
-
- mmctx_set_pmm_state(mmctx, PMM_IDLE);
- mmctx_set_pmm_state(mmctx, PMM_DETACHED);
-}
-
-static void mmctx_cleanup_geran(struct sgsn_mm_ctx *mmctx)
-{
- if (mmctx->ran_type != MM_CTX_T_GERAN_Gb)
- return;
-
- if (mmctx->pmm_state == PMM_DETACHED)
- return;
-
- mmctx_set_mm_state(mmctx, MM_IDLE);
-}
-
/* Chapter 9.4.14: Routing area update request */
static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
struct gprs_llc_llme *llme)