Change in osmo-sip-connector[master]: Logging: Further use of osmo_mncc_name() in logging

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Oct 3 08:28:20 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11193 )

Change subject: Logging: Further use of osmo_mncc_name() in logging
......................................................................

Logging: Further use of osmo_mncc_name() in logging

Use osmo_mncc_name() in timer functions and in logging
the type of MNCC message sent to the socket.

Change-Id: Ic77e0d86c91c29ff7304e620fdecb69b22127d33
---
M src/mncc.c
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/mncc.c b/src/mncc.c
index 1b44e05..976a671 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -65,20 +65,21 @@
 
 	leg->cmd_timeout.cb = cmd_timeout;
 	leg->cmd_timeout.data = leg;
+	LOGP(DMNCC, LOGL_DEBUG, "Starting Timer for %s\n", osmo_mncc_name(expected_next));
 	osmo_timer_schedule(&leg->cmd_timeout, 5, 0);
 }
 
 static void stop_cmd_timer(struct mncc_call_leg *leg, uint32_t got_res)
 {
 	if (leg->rsp_wanted != got_res) {
-		LOGP(DMNCC, LOGL_ERROR, "Wanted rsp(%u) but got(%u) for leg(%u)\n",
-			leg->rsp_wanted, got_res, leg->callref);
+		LOGP(DMNCC, LOGL_ERROR, "Wanted rsp(%s) but got(%s) for leg(%u)\n",
+			osmo_mncc_name(leg->rsp_wanted), osmo_mncc_name(got_res), leg->callref);
 		return;
 	}
 
 	LOGP(DMNCC, LOGL_DEBUG,
-		"Got response(0x%x), stopping timer on leg(%u)\n",
-		got_res, leg->callref);
+		"Got response(%s), stopping timer on leg(%u)\n",
+		osmo_mncc_name(got_res), leg->callref);
 	osmo_timer_del(&leg->cmd_timeout);
 }
 
@@ -127,6 +128,7 @@
 	 * static struct?
 	 */
 	rc = write(conn->fd.fd, mncc, sizeof(*mncc));
+	LOGP(DMNCC, LOGL_DEBUG, "MNCC sent message type: %s\n", osmo_mncc_name(mncc->msg_type));
 	if (rc != sizeof(*mncc)) {
 		LOGP(DMNCC, LOGL_ERROR, "Failed to send message call(%u)\n", callref);
 		close_connection(conn);

-- 
To view, visit https://gerrit.osmocom.org/11193
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic77e0d86c91c29ff7304e620fdecb69b22127d33
Gerrit-Change-Number: 11193
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181003/880aa382/attachment.htm>


More information about the gerrit-log mailing list