Skip to content

Commit

Permalink
sm: pdpctx_timer_stop(): warn about timer not running
Browse files Browse the repository at this point in the history
Similarly to 282de03, 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: 282de03 "gmm: mmctx_timer_stop(): warn about timer not running"
  • Loading branch information
axilirator authored and laf0rge committed Aug 30, 2024
1 parent 12ed86d commit 13592d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sgsn/gprs_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,14 @@ static void pdpctx_timer_start(struct sgsn_pdp_ctx *pdp, unsigned int T)

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);
}

Expand Down

0 comments on commit 13592d2

Please sign in to comment.