laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/37852?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"
---
M src/sgsn/gprs_sm.c
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




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


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/37852?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I64932d1cbd93667ab2e94e04691d6601435dba81
Gerrit-Change-Number: 37852
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to