From c2007bc0f9e55c6a4fb421d83a001047ccf2bb51 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 9 Oct 2008 10:02:45 +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=/branches/glib-2-18/; revision=7582 --- gio/ChangeLog | 5 +++++ gio/gunixinputstream.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index deb156cdb..6c2c067e0 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-05 Pascal Terjan Bug 554970 – segfault when update-desktop-database is not available diff --git a/gio/gunixinputstream.c b/gio/gunixinputstream.c index 98280cdff..f7c87693b 100644 --- a/gio/gunixinputstream.c +++ b/gio/gunixinputstream.c @@ -207,7 +207,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) {