From b462a03c3525090e3a1d4999980ae19349ffb9fd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 6 Apr 2010 11:17:07 +0200 Subject: nat: Improve the log message and print the errno/strerror(errno) --- openbsc/src/nat/bsc_mgcp_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openbsc') diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c index 1397d0e7a..9e7c822ad 100644 --- a/openbsc/src/nat/bsc_mgcp_utils.c +++ b/openbsc/src/nat/bsc_mgcp_utils.c @@ -157,7 +157,8 @@ int bsc_mgcp_policy_cb(struct mgcp_config *cfg, int endpoint, int state, const c struct sockaddr_in sock; socklen_t len = sizeof(sock); if (getpeername(nat->mgcp_queue.bfd.fd, (struct sockaddr *) &sock, &len) != 0) { - LOGP(DMGCP, LOGL_ERROR, "Can not get the peername...\n"); + LOGP(DMGCP, LOGL_ERROR, "Can not get the peername...%d/%s\n", + errno, strerror(errno)); } else { mgcp_endp->bts = sock.sin_addr; } -- cgit v1.2.3