laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/36699?usp=email )
Change subject: gmm: mmctx_timer_stop(): warn about timer not running ......................................................................
gmm: mmctx_timer_stop(): warn about timer not running
This turns errors like:
DMM ERROR MM(262420000000038/e2ff704e) Stopping MM timer 3350 but 0 is running
into warnings with a more accurate reason:
DMM NOTICE MM(262420000000037/e2ff704e) Stopping *inactive* MM timer 3350
Change-Id: I56ecad9d8f1049974b0896f6d0e7fc61580155ec --- M src/sgsn/gprs_gmm.c 1 file changed, 23 insertions(+), 1 deletion(-)
Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified tnt: Looks good to me, but someone else must approve
diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 768b321..653c425 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -111,9 +111,14 @@
static void mmctx_timer_stop(struct sgsn_mm_ctx *mm, unsigned int T) { - if (mm->T != T) + if (!osmo_timer_pending(&mm->timer)) { + LOGMMCTXP(LOGL_NOTICE, mm, "Stopping *inactive* MM timer %u\n", T); + return; + } + if (mm->T != T) { LOGMMCTXP(LOGL_ERROR, mm, "Stopping MM timer %u but " "%u is running\n", T, mm->T); + } osmo_timer_del(&mm->timer); }