osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/38157?usp=email )
Change subject: sm: pdpctx_timer_stop(): warn about timer not running ......................................................................
sm: pdpctx_timer_stop(): warn about timer not running
Similarly to 282de031, this commit turns errors like:
DGPRS ERROR PDP(---/0) Stopping PDP timer 3395 but 0 is running
into warnings with a more accurate reason:
DGPRS ERROR PDP(---/0) Stopping *inactive* PDP timer 3395
Change-Id: I64932d1cbd93667ab2e94e04691d6601435dba81 Related: 282de031 "gmm: mmctx_timer_stop(): warn about timer not running" (cherry picked from commit 13592d2fa5d5318857e6b67ff038d66afd3eff59) --- M src/sgsn/gprs_sm.c 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/57/38157/1
diff --git a/src/sgsn/gprs_sm.c b/src/sgsn/gprs_sm.c index 88d1feb..bcf2923 100644 --- a/src/sgsn/gprs_sm.c +++ b/src/sgsn/gprs_sm.c @@ -114,9 +114,14 @@
static void pdpctx_timer_stop(struct sgsn_pdp_ctx *pdp, unsigned int T) { - if (pdp->T != T) + if (!osmo_timer_pending(&pdp->timer)) { + LOGPDPCTXP(LOGL_NOTICE, pdp, "Stopping *inactive* PDP timer %u\n", T); + return; + } + 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); }