aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-08-12 18:28:11 +0200
committerAlexander Couzens <lynxis@fe80.eu>2019-08-23 22:58:14 +0200
commitebc1d05f4e22c6c7219ea91dad750e1c4ed3f5a2 (patch)
tree9c904be7046a5e6733fcce26104fcd1f272c514f
parent5623eb843958bf65ac9fe323a914788b8092b073 (diff)
gprs_gmm: only update gb/iu cell information when Iu/Gb present
This function should not do the transistion of Iu/Gb. Only copy simple data Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
-rw-r--r--src/gprs/gprs_gmm.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index e44b3ec3..55fe3f65 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -375,15 +375,20 @@ static void gmm_copy_id(struct msgb *msg, const struct msgb *old)
/* Store BVCI/NSEI in MM context */
static void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg)
{
- mm->gb.bvci = msgb_bvci(msg);
- mm->gb.nsei = msgb_nsei(msg);
- /* In case a Iu connection is reconnected we need to update the ue ctx */
- mm->iu.ue_ctx = MSG_IU_UE_CTX(msg);
- if (mm->ran_type == MM_CTX_T_UTRAN_Iu
- && mm->iu.ue_ctx) {
+ /* check for Iu or Gb */
+ if (!MSG_IU_UE_CTX(msg)) {
+ mm->gb.bvci = msgb_bvci(msg);
+ mm->gb.nsei = msgb_nsei(msg);
+ } else {
#ifdef BUILD_IU
- mm->iu.ue_ctx->rab_assign_addr_enc =
- sgsn->cfg.iu.rab_assign_addr_enc;
+ /* In case a Iu connection is reconnected we need to update the ue ctx */
+ /* FIXME: the old ue_ctx have to be freed/disconnected */
+ mm->iu.ue_ctx = msg->dst;
+ if (mm->ran_type == MM_CTX_T_UTRAN_Iu
+ && mm->iu.ue_ctx) {
+ mm->iu.ue_ctx->rab_assign_addr_enc =
+ sgsn->cfg.iu.rab_assign_addr_enc;
+ }
#endif
}
}