summaryrefslogtreecommitdiff
path: root/socket
diff options
context:
space:
mode:
authorJakub Adam <jakub.adam@ktknet.cz>2017-04-02 16:38:21 +0200
committerPhilip Withnall <withnall@endlessm.com>2017-04-03 10:46:11 +0100
commit3c20e78fcd653a2db67f03c16d270beda2763a30 (patch)
tree959be782a89eeda1992f6ff9ab1a138bea6cec92 /socket
parent7c0fa2256c36b59477dbf4695b87b32b1997ec21 (diff)
downloadlibnice-3c20e78fcd653a2db67f03c16d270beda2763a30.tar.gz
udp-bsd: Log g_socket_send_message() errors
Those may have previously been silently ignored. Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D1708
Diffstat (limited to 'socket')
-rw-r--r--socket/udp-bsd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/socket/udp-bsd.c b/socket/udp-bsd.c
index 3fac544..70cd0ab 100644
--- a/socket/udp-bsd.c
+++ b/socket/udp-bsd.c
@@ -50,6 +50,7 @@
#include <fcntl.h>
#include "udp-bsd.h"
+#include "agent-priv.h"
#ifndef G_OS_WIN32
#include <unistd.h>
@@ -275,8 +276,12 @@ socket_send_message (NiceSocket *sock, const NiceAddress *to,
message->n_buffers, NULL, 0, G_SOCKET_MSG_NONE, NULL, &child_error);
if (len < 0) {
- if (g_error_matches (child_error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK))
+ if (g_error_matches (child_error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) {
len = 0;
+ } else {
+ nice_debug_verbose ("%s: udp-bsd socket %p: error: %s", G_STRFUNC, sock,
+ child_error->message);
+ }
g_error_free (child_error);
}