Commit 25fa88f8 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h

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
parent e526412a
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment