diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-05-31 20:23:38 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-31 20:23:38 +0200 |
commit | c2e8cc4a10d741763736d375bb663c593ee2de31 (patch) | |
tree | 32d82a7905cf83e44b8d4d69749c4ab8fbd23c3d /openbsc/src/gprs/gprs_sgsn.c | |
parent | 3d379ba589cef46de16f3382fede63f5faf2348d (diff) |
[GPRS] Implement TMSI reallocation and timers 3350 + 3370
Our state transitions and timers now reflect 04.08 for GMM much
better than before. Also, we allocate a new P-TMSI on every ATTACH
and RA UPDATE, as some phones seem to get confused if they don't
get a P-TMSI.
Diffstat (limited to 'openbsc/src/gprs/gprs_sgsn.c')
-rw-r--r-- | openbsc/src/gprs/gprs_sgsn.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 0e87e62e0..bab34d8d7 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -84,7 +84,8 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_by_tlli(uint32_t tlli, tlli_type = gprs_tlli_type(tlli); if (tlli_type == TLLI_LOCAL) { llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { - if ((ctx->p_tmsi | 0xC0000000) == tlli) { + if ((ctx->p_tmsi | 0xC0000000) == tlli || + (ctx->p_tmsi_old && (ctx->p_tmsi_old | 0xC0000000) == tlli)) { ctx->tlli = tlli; return ctx; } @@ -99,7 +100,8 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_by_ptmsi(uint32_t p_tmsi) struct sgsn_mm_ctx *ctx; llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { - if (p_tmsi == ctx->p_tmsi) + if (p_tmsi == ctx->p_tmsi || + (ctx->p_tmsi_old && ctx->p_tmsi_old == p_tmsi)) return ctx; } return NULL; |