summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-12 14:08:28 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-10-12 14:08:28 +0200
commit078905a0603c91b227854abfa01c9e24143e39a1 (patch)
tree7bf01a84cf87bd99da378ab1274b5d2fcc525379 /openbsc
parentcad739d2386640a68c24e3d470ddacdcaf377561 (diff)
mgcp: Log endpoint nr consistently as hex
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c4
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c10
-rw-r--r--openbsc/tests/mgcp/mgcp_test.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 799d99838..49500d92c 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -763,7 +763,7 @@ static int rtp_data_net(struct osmo_fd *fd, unsigned int what)
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 @@ static int rtp_data_bts(struct osmo_fd *fd, unsigned int what)
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 0a4441c61..71e8eae97 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -340,12 +340,12 @@ static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr,
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 @@ int osmux_enable_endpoint(struct mgcp_endpoint *endp, struct in_addr *addr, uint
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 @@ int osmux_enable_endpoint(struct mgcp_endpoint *endp, struct in_addr *addr, uint
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 @@ int osmux_send_dummy(struct mgcp_endpoint *endp)
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 92099dbee..e7a582a33 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -436,7 +436,7 @@ static int last_endpoint = -1;
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 @@ static void test_messages(void)
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,