Change in openbsc[master]: mgcp: Log endpoint nr consistently as hex

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Oct 12 12:13:51 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/11327


Change subject: mgcp: Log endpoint nr consistently as hex
......................................................................

mgcp: Log endpoint nr consistently as hex

Change-Id: I281964935312161d1da49e8035c5bf3bb7bf9c5c
---
M openbsc/src/libmgcp/mgcp_network.c
M openbsc/src/libmgcp/mgcp_osmux.c
M openbsc/tests/mgcp/mgcp_test.c
3 files changed, 9 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/27/11327/1

diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 799d998..49500d9 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -763,7 +763,7 @@
 		break;
 	}
 
-	LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint %u\n",
+	LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint 0x%x\n",
 	     endp->type, ENDPOINT_NUMBER(endp));
 	return 0;
 }
@@ -856,7 +856,7 @@
 		break;	/* Should not happen */
 	}
 
-	LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint %u\n",
+	LOGP(DMGCP, LOGL_ERROR, "Bad MGCP type %u on endpoint 0x%x\n",
 	     endp->type, ENDPOINT_NUMBER(endp));
 	return 0;
 }
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 0a4441c..71e8eae 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -340,12 +340,12 @@
 
 	if (osmux_enable_endpoint(endp, &addr->sin_addr, addr->sin_port) < 0 ) {
 		LOGP(DMGCP, LOGL_ERROR,
-		     "Could not enable osmux in endpoint %d\n",
+		     "Could not enable osmux in endpoint 0x%x\n",
 		     ENDPOINT_NUMBER(endp));
 		goto out;
 	}
 
-	LOGP(DMGCP, LOGL_INFO, "Enabling osmux in endpoint %d for %s:%u\n",
+	LOGP(DMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for %s:%u\n",
 	     ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
 	     ntohs(addr->sin_port));
 out:
@@ -442,7 +442,7 @@
 	static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);
 
 	if (endp->osmux.state == OSMUX_STATE_DISABLED) {
-		LOGP(DMGCP, LOGL_ERROR, "Endpoint %u didn't request Osmux\n",
+		LOGP(DMGCP, LOGL_ERROR, "Endpoint 0x%x didn't request Osmux\n",
 		     ENDPOINT_NUMBER(endp));
 		return -1;
 	}
@@ -482,7 +482,7 @@
 
 void osmux_disable_endpoint(struct mgcp_endpoint *endp)
 {
-	LOGP(DMGCP, LOGL_INFO, "Releasing endpoint %u using Osmux CID %u\n",
+	LOGP(DMGCP, LOGL_INFO, "Releasing endpoint 0x%x using Osmux CID %u\n",
 	     ENDPOINT_NUMBER(endp), endp->osmux.cid);
 
 	/* We are closing, we don't need pending RTP packets to be transmitted */
@@ -528,7 +528,7 @@
 		if (osmux_enable_endpoint(endp, &endp->net_end.addr,
 					  htons(endp->cfg->osmux_port)) < 0) {
 			LOGP(DMGCP, LOGL_ERROR,
-			     "Could not activate osmux in endpoint %d\n",
+			     "Could not activate osmux in endpoint 0x%x\n",
 			     ENDPOINT_NUMBER(endp));
 		}
 		LOGP(DMGCP, LOGL_ERROR,
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index 92099db..e7a582a 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -436,7 +436,7 @@
 static int mgcp_test_policy_cb(struct mgcp_trunk_config *cfg, int endpoint,
 			       int state, const char *transactio_id)
 {
-	fprintf(stderr, "Policy CB got state %d on endpoint %d\n",
+	fprintf(stderr, "Policy CB got state %d on endpoint 0x%x\n",
 		state, endpoint);
 	last_endpoint = endpoint;
 	return MGCP_POLICY_CONT;
@@ -603,7 +603,7 @@
 			OSMO_ASSERT(last_endpoint != -1);
 			endp = &cfg->trunk.endpoints[last_endpoint];
 
-			fprintf(stderr, "endpoint %d: "
+			fprintf(stderr, "endpoint 0x%x: "
 				"payload type BTS %d (exp %d), NET %d (exp %d)\n",
 				last_endpoint,
 				endp->bts_end.codec.payload_type, t->exp_bts_ptype,

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I281964935312161d1da49e8035c5bf3bb7bf9c5c
Gerrit-Change-Number: 11327
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181012/470745a1/attachment.htm>


More information about the gerrit-log mailing list