aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-07 12:55:40 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-07 22:52:40 +0200
commit575b89585f7fa7cb4104eeb9f853561af16603d3 (patch)
treecd7f71f96a8ff99c055abb256acea72519b53ddd /openbsc/src
parent408cc4ace99a9163136af601549a5d1b67a168c7 (diff)
[mgcp] Print the errno/strerror when we can not receive from our socket
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/mgcp/mgcp_network.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/mgcp/mgcp_network.c b/openbsc/src/mgcp/mgcp_network.c
index a5a2481fe..cd10d2a8c 100644
--- a/openbsc/src/mgcp/mgcp_network.c
+++ b/openbsc/src/mgcp/mgcp_network.c
@@ -25,6 +25,7 @@
#include <string.h>
#include <unistd.h>
#include <endian.h>
+#include <errno.h>
#include <sys/socket.h>
#include <arpa/inet.h>
@@ -122,8 +123,8 @@ static int rtp_data_cb(struct bsc_fd *fd, unsigned int what)
rc = recvfrom(fd->fd, &buf, sizeof(buf), 0,
(struct sockaddr *) &addr, &slen);
if (rc < 0) {
- LOGP(DMGCP, LOGL_ERROR, "Failed to receive message on: 0x%x\n",
- ENDPOINT_NUMBER(endp));
+ LOGP(DMGCP, LOGL_ERROR, "Failed to receive message on: 0x%x errno: %d/%s\n",
+ ENDPOINT_NUMBER(endp), errno, strerror(errno));
return -1;
}