From 16606c9007ae97bbb0ca796384381b4decceee91 Mon Sep 17 00:00:00 2001 From: Pravin Kumarvel Date: Thu, 17 Nov 2016 12:20:01 +0530 Subject: [PATCH] Add support for pdpctx_timer_stop Timer T3395 starts at the transmission of Deactivate PDP request using pdpctx_timer_start but there was no corresponding stop function. The timer is stopped when Deactivate PDP Context Accept is received. This according to 3gpp spec reference 24.008 section 6.1.3.4.2. Change-Id: I825c0a47d39e784dd1b8251f564609262530a5c6 --- openbsc/src/gprs/gprs_gmm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index b30b8d3f2..1fc27846c 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -1990,6 +1990,14 @@ static void pdpctx_timer_start(struct sgsn_pdp_ctx *pdp, unsigned int T, osmo_timer_schedule(&pdp->timer, seconds, 0); } +static void pdpctx_timer_stop(struct sgsn_pdp_ctx *pdp, unsigned int T) +{ + if (pdp->T != T) + LOGPDPCTXP(LOGL_ERROR, pdp, "Stopping PDP timer %u but " + "%u is running\n", T, pdp->T); + osmo_timer_del(&pdp->timer); +} + #if 0 static void msgb_put_pdp_addr_ipv4(struct msgb *msg, uint32_t ipaddr) { @@ -2464,7 +2472,8 @@ static int gsm48_rx_gsm_deact_pdp_ack(struct sgsn_mm_ctx *mm, struct msgb *msg) mm->imsi, transaction_id); return 0; } - + /* stop timer 3395 */ + pdpctx_timer_stop(pdp, 3395); return sgsn_delete_pdp_ctx(pdp); }