diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-11-12 10:55:29 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-11-12 10:55:29 +0100 |
commit | eedb45362df2b5e9a0749e7bb8d124ec6a8100ba (patch) | |
tree | 0035c9a12bf8b270544e1b0e9036893998eacda3 | |
parent | 98da544992934f9199c855f6429b32baf51ecc7a (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.
-rw-r--r-- | openbsc/src/libmgcp/mgcp_network.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c index 03d0f35f6..eb8b736b0 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; } |