fixeria has uploaded this change for review. (
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/99/36699/1
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);
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-sgsn/+/36699?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I56ecad9d8f1049974b0896f6d0e7fc61580155ec
Gerrit-Change-Number: 36699
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange