mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
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
This commit is contained in:
parent
328346ad21
commit
2c54ea5ba9
2 changed files with 12 additions and 4 deletions
|
@ -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 ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue