diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-01-08 01:37:42 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-03-03 16:19:07 +0100 |
commit | 08ed1d73f299828ed27e45b17b08c005864cb5ca (patch) | |
tree | 5b591d9d6dd9884d96e71b25f6d8439368ee9aa7 /openbsc/src/gprs/gprs_sgsn.c | |
parent | af9bfac58dd7e4030730db08cefa2b51b8a17209 (diff) |
fix sgsn_mm_ctx_cleanup_free: TLLI unass. after sgsn_mm_ctx_free.
The comment says so and it was moved above sgsn_mm_ctx_free in a commit
marked as ugly hack.
Diffstat (limited to 'openbsc/src/gprs/gprs_sgsn.c')
-rw-r--r-- | openbsc/src/gprs/gprs_sgsn.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 1aa29be28..80de246c2 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -237,6 +237,7 @@ void sgsn_mm_ctx_cleanup_free(struct sgsn_mm_ctx *mm) uint32_t tlli = mm->gb.tlli; struct sgsn_pdp_ctx *pdp, *pdp2; struct sgsn_signal_data sig_data; + enum sgsn_ran_type ran_type; /* Forget about ongoing look-ups */ if (mm->ggsn_lookup) { @@ -270,13 +271,15 @@ void sgsn_mm_ctx_cleanup_free(struct sgsn_mm_ctx *mm) subscr_put(subscr); } - if (mm->ran_type == MM_CTX_T_GERAN_Gb) { - /* TLLI unassignment, must be called after sgsn_mm_ctx_free */ - gprs_llgmm_assign(llme, tlli, 0xffffffff, GPRS_ALGO_GEA0, NULL); - } + ran_type = mm->ran_type; sgsn_mm_ctx_free(mm); mm = NULL; + + if (ran_type == MM_CTX_T_GERAN_Gb) { + /* TLLI unassignment, must be called after sgsn_mm_ctx_free */ + gprs_llgmm_assign(llme, tlli, 0xffffffff, GPRS_ALGO_GEA0, NULL); + } } |