aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_network.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-11-12 10:55:29 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-11-12 10:55:29 +0100
commiteedb45362df2b5e9a0749e7bb8d124ec6a8100ba (patch)
tree0035c9a12bf8b270544e1b0e9036893998eacda3 /openbsc/src/libmgcp/mgcp_network.c
parent98da544992934f9199c855f6429b32baf51ecc7a (diff)
mgcp: Print both receivd and expected address in the error statement
The log statement is split into two because inet_ntoa works on an internal buffer and would print the last address twice.
Diffstat (limited to 'openbsc/src/libmgcp/mgcp_network.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 03d0f35..eb8b736 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -344,8 +344,10 @@ static int rtp_data_net(struct osmo_fd *fd, unsigned int what)
if (memcmp(&addr.sin_addr, &endp->net_end.addr, sizeof(addr.sin_addr)) != 0) {
LOGP(DMGCP, LOGL_ERROR,
- "Data from wrong address %s on 0x%x\n",
- inet_ntoa(addr.sin_addr), ENDPOINT_NUMBER(endp));
+ "Endpoint 0x%x data from wrong address %s vs. ",
+ ENDPOINT_NUMBER(endp), inet_ntoa(addr.sin_addr));
+ LOGPC(DMGCP, LOGL_ERROR,
+ "%s\n", inet_ntoa(endp->net_end.addr));
return -1;
}