mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Bug 591714 – Figure out failure handling for g_cancellable_make_pollfd()
Make g_cancellable_make_pollfd() return a gboolean that indicates its error status. Update the code that calls this function accordingly.
This commit is contained in:
@@ -340,11 +340,10 @@ g_unix_input_stream_read (GInputStream *stream,
|
||||
|
||||
unix_stream = G_UNIX_INPUT_STREAM (stream);
|
||||
|
||||
if (cancellable)
|
||||
if (g_cancellable_make_pollfd (cancellable, &poll_fds[1]))
|
||||
{
|
||||
poll_fds[0].fd = unix_stream->priv->fd;
|
||||
poll_fds[0].events = G_IO_IN;
|
||||
g_cancellable_make_pollfd (cancellable, &poll_fds[1]);
|
||||
do
|
||||
poll_ret = g_poll (poll_fds, 2, -1);
|
||||
while (poll_ret == -1 && errno == EINTR);
|
||||
|
Reference in New Issue
Block a user