Actually return -1 in case of cancelled, not old res value.

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=/branches/glib-2-18/; revision=7582
This commit is contained in:
Alexander Larsson
2008-10-09 10:02:45 +00:00
committed by Alexander Larsson
parent 49ffecc6ba
commit c2007bc0f9
2 changed files with 6 additions and 1 deletions

View 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-05 Pascal Terjan <pterjan@linuxfr.org>
Bug 554970 segfault when update-desktop-database is not available

View File

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