Commit 2c54ea5b authored by Luis de Bethencourt's avatar Luis de Bethencourt

dv1394: log error if failed to set socket status flag

Log an error message if failed to set write or read socket as
non-blocking.

CID 1139608
CID 1139609
parent 328346ad
......@@ -790,8 +790,12 @@ gst_dv1394src_start (GstBaseSrc * bsrc)
READ_SOCKET (src) = control_sock[0];
WRITE_SOCKET (src) = control_sock[1];
fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK);
fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK);
if (fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK) < 0)
GST_ERROR_OBJECT (src, "failed to make read socket non-blocking: %s",
g_strerror (errno));
if (fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK) < 0)
GST_ERROR_OBJECT (src, "failed to make write socket non-blocking: %s",
g_strerror (errno));
src->handle = raw1394_new_handle ();
......
......@@ -527,8 +527,12 @@ gst_hdv1394src_start (GstBaseSrc * bsrc)
READ_SOCKET (src) = control_sock[0];
WRITE_SOCKET (src) = control_sock[1];
fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK);
fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK);
if (fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK) < 0)
GST_ERROR_OBJECT (src, "failed to make read socket non-blocking: %s",
g_strerror (errno));
if (fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK) < 0)
GST_ERROR_OBJECT (src, "failed to make write socket non-blocking: %s",
g_strerror (errno));
src->handle = raw1394_new_handle ();
......
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