mgcp: Log endpoint nr consistently as hex

Port from openbsc 078905a0603c91b227854abfa01c9e24143e39a1.
Change-Id: Idcb40e6fd561b24e111afe7463f44c43c530fac5
This commit is contained in:
Pau Espin Pedrol
2018-10-16 15:35:58 +02:00
parent 426a9d9103
commit 9ecceb651b
3 changed files with 5 additions and 5 deletions

View File

@@ -407,12 +407,12 @@ static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr,
if (osmux_enable_conn(endp, conn_net, &addr->sin_addr, addr->sin_port) < 0 ) {
LOGP(DLMGCP, 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(DLMGCP, LOGL_INFO, "Enabling osmux in endpoint %d for %s:%u\n",
LOGP(DLMGCP, 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:

View File

@@ -691,7 +691,7 @@ static bool parse_x_osmo_ign(struct mgcp_endpoint *endp, char *line)
if (!strcmp(token, "C"))
endp->x_osmo_ign |= MGCP_X_OSMO_IGN_CALLID;
else
LOGP(DLMGCP, LOGL_ERROR, "endpoint %x: received unknown X-Osmo-IGN item '%s'\n",
LOGP(DLMGCP, LOGL_ERROR, "endpoint 0x%x: received unknown X-Osmo-IGN item '%s'\n",
ENDPOINT_NUMBER(endp), token);
}

View File

@@ -550,7 +550,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;
@@ -813,7 +813,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 %d (expected %d)\n",
last_endpoint,
conn->end.codec->payload_type, t->ptype);