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:
Benjamin Otte
2009-08-13 20:19:15 +02:00
parent a0e3b4ae84
commit bb8e4f06ab
5 changed files with 34 additions and 31 deletions

View File

@@ -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);