Change in ...osmo-sip-connector[master]: avoid bogus error logs when no cmd_timer is set

neels gerrit-no-reply at lists.osmocom.org
Fri Aug 9 00:50:38 UTC 2019


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/15142


Change subject: avoid bogus error logs when no cmd_timer is set
......................................................................

avoid bogus error logs when no cmd_timer is set

mncc.c often calls stop_cmd_timer() even if no timer is running. If no timer is
set, this causes bogus ERROR logs saying:
  Wanted response(<random>) but got (<msgtype>)

Instead do nothing if no timer is pending at all.

Change-Id: I70f85a71df55ab8618ed78864cefb6fe5b26f581
---
M src/mncc.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/42/15142/1

diff --git a/src/mncc.c b/src/mncc.c
index f5a44d5..d223906 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -71,6 +71,8 @@
 
 static void stop_cmd_timer(struct mncc_call_leg *leg, uint32_t got_res)
 {
+	if (!osmo_timer_pending(&leg->cmd_timeout))
+		return;
 	if (leg->rsp_wanted != got_res) {
 		LOGP(DMNCC, LOGL_ERROR, "Wanted response(%s) but got(%s) for leg(%u)\n",
 			osmo_mncc_name(leg->rsp_wanted), osmo_mncc_name(got_res), leg->callref);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/15142
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: I70f85a71df55ab8618ed78864cefb6fe5b26f581
Gerrit-Change-Number: 15142
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190809/98016455/attachment.html>


More information about the gerrit-log mailing list