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
This commit is contained in:
parent
c3156193da
commit
282de031f1
|
@ -111,9 +111,14 @@ static void mmctx_timer_start(struct sgsn_mm_ctx *mm, unsigned int T)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue