summaryrefslogtreecommitdiff
path: root/gst/udp
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-04-21 13:32:40 +0100
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-04-21 17:21:20 +0100
commit25fa88f8aae16d9f11db4808c11080e070b6af41 (patch)
tree42d1f3f2c00592923fafaaba6e9f7a5e8d314e42 /gst/udp
parente526412afa4af79bbdf46af0ed288aebb472ea8e (diff)
multiidpsink: warn when setsockopt fails
This doesn't seem to be fatal, but it's good to let the user know in the logs. Coverity 1139630
Diffstat (limited to 'gst/udp')
-rw-r--r--gst/udp/gstmultiudpsink.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c
index fc94c8f72..988de2deb 100644
--- a/gst/udp/gstmultiudpsink.c
+++ b/gst/udp/gstmultiudpsink.c
@@ -1139,12 +1139,18 @@ gst_multiudpsink_start (GstBaseSink * bsink)
#ifdef SO_BINDTODEVICE
if (sink->multi_iface) {
if (sink->used_socket) {
- setsockopt (g_socket_get_fd (sink->used_socket), SOL_SOCKET,
- SO_BINDTODEVICE, sink->multi_iface, strlen (sink->multi_iface));
+ if (setsockopt (g_socket_get_fd (sink->used_socket), SOL_SOCKET,
+ SO_BINDTODEVICE, sink->multi_iface,
+ strlen (sink->multi_iface)) < 0)
+ GST_WARNING_OBJECT (sink, "setsockopt SO_BINDTODEVICE failed: %s",
+ strerror (errno));
}
if (sink->used_socket_v6) {
- setsockopt (g_socket_get_fd (sink->used_socket_v6), SOL_SOCKET,
- SO_BINDTODEVICE, sink->multi_iface, strlen (sink->multi_iface));
+ if (setsockopt (g_socket_get_fd (sink->used_socket_v6), SOL_SOCKET,
+ SO_BINDTODEVICE, sink->multi_iface,
+ strlen (sink->multi_iface)) < 0)
+ GST_WARNING_OBJECT (sink, "setsockopt SO_BINDTODEVICE failed (v6): %s",
+ strerror (errno));
}
}
#endif