summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Santos <jrsantos@jonathanrsantos.com>2011-06-10 17:08:56 -0400
committerHarald Welte <laforge@gnumonks.org>2011-10-16 21:36:25 +0200
commit6352889113c7b3424db1132ca9a521be6a10ed74 (patch)
tree45cf8f1c19e67da1f6ab9d9b87c7893972f335d7
parent069830d42b1467c02ef77c3d30fc845347842211 (diff)
gprs: Set GMM state to GMM_REGISTERED_NORMAL after ATTACH_COMPLETE received
The SGSN was updating the GMM state when sending the ATTACH_ACCEPT, when it should enter that state after the ATTACH_COMPLETE is received.
-rw-r--r--openbsc/src/gprs/gprs_gmm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 0848b51b8..471a66197 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -549,7 +549,6 @@ static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx,
ctx->t3350_mode = t3350_mode;
mmctx_timer_start(ctx, 3350, GSM0408_T3350_SECS);
#endif
- ctx->mm_state = GMM_REGISTERED_NORMAL;
return gsm48_tx_gmm_att_ack(ctx);
}
if (!strlen(ctx->imei)) {
@@ -1058,6 +1057,7 @@ static int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
case GSM48_MT_GMM_ATTACH_COMPL:
/* only in case SGSN offered new P-TMSI */
DEBUGP(DMM, "-> ATTACH COMPLETE\n");
+ mmctx->mm_state = GMM_REGISTERED_NORMAL;
mmctx_timer_stop(mmctx, 3350);
mmctx->p_tmsi_old = 0;
/* Unassign the old TLLI */
@@ -1109,8 +1109,6 @@ static void mmctx_timer_cb(void *_mm)
case 3350: /* waiting for ATTACH COMPLETE */
if (mm->num_T_exp >= 5) {
LOGP(DMM, LOGL_NOTICE, "T3350 expired >= 5 times\n");
- mm->mm_state = GMM_DEREGISTERED;
- /* FIXME: should we return some error? */
break;
}
/* re-transmit the respective msg and re-start timer */