From 3c20e78fcd653a2db67f03c16d270beda2763a30 Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Sun, 2 Apr 2017 16:38:21 +0200 Subject: [PATCH] udp-bsd: Log g_socket_send_message() errors Those may have previously been silently ignored. Reviewed-by: Philip Withnall Differential Revision: https://phabricator.freedesktop.org/D1708 --- socket/udp-bsd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 #include "udp-bsd.h" +#include "agent-priv.h" #ifndef G_OS_WIN32 #include @@ -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); } -- 2.7.4