From 585135279f16dcac4929e0f7ecaed098d7b5dcfb Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 9 Oct 2008 10:03:12 +0000 Subject: [PATCH] Actually return -1 in case of cancelled, not old res value. 2008-10-09 Alexander Larsson * 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 | 5 +++++ gio/gunixinputstream.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index 9571c8fc0..213cc923c 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,8 @@ +2008-10-09 Alexander Larsson + + * gunixinputstream.c (g_unix_input_stream_read): + Actually return -1 in case of cancelled, not old res value. + 2008-10-06 Colin Walters Bug 554745 - GFileAttributeInfoList should be boxed diff --git a/gio/gunixinputstream.c b/gio/gunixinputstream.c index 155b9e687..da9c8f413 100644 --- a/gio/gunixinputstream.c +++ b/gio/gunixinputstream.c @@ -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) {