Actually return -1 in case of cancelled, not old res value.
authorAlexander Larsson <alexl@redhat.com>
Thu, 9 Oct 2008 10:03:12 +0000 (10:03 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Thu, 9 Oct 2008 10:03:12 +0000 (10:03 +0000)
2008-10-09  Alexander Larsson  <alexl@redhat.com>

* gunixinputstream.c (g_unix_input_stream_read):
Actually return -1 in case of cancelled, not old res value.

svn path=/trunk/; revision=7583

gio/ChangeLog
gio/gunixinputstream.c

index 9571c8f..213cc92 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-09  Alexander Larsson  <alexl@redhat.com>
+
+       * gunixinputstream.c (g_unix_input_stream_read):
+       Actually return -1 in case of cancelled, not old res value.
+
 2008-10-06  Colin Walters  <walters@verbum.org>
 
        Bug 554745 - GFileAttributeInfoList should be boxed
index 155b9e6..da9c8f4 100644 (file)
@@ -201,7 +201,7 @@ g_unix_input_stream_read (GInputStream  *stream,
   while (1)
     {
       if (g_cancellable_set_error_if_cancelled (cancellable, error))
-       break;
+       return -1;
       res = read (unix_stream->priv->fd, buffer, count);
       if (res == -1)
        {