diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-07 12:55:40 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-07 12:55:40 +0200 |
commit | ec1f15d513016565eae8678612aa5e38c078cca5 (patch) | |
tree | faf0ac2b96e05e60394beece02a1678035bac4db | |
parent | b76cd5ed7eda93e4dcb9b0f82f6082116c7d305a (diff) |
[mgcp] Print the errno/strerror when we can not receive from our socket
-rw-r--r-- | openbsc/src/mgcp/mgcp_network.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/mgcp/mgcp_network.c b/openbsc/src/mgcp/mgcp_network.c index 95325e948..4ece48917 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; } |