[glib] goutputstream: Report input stream read failure correctly
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] goutputstream: Report input stream read failure correctly
- Date: Thu, 8 Oct 2015 18:08:29 +0000 (UTC)
commit 16e0a5a886c60a648e74afd12c0cbeeb58d6d522
Author: John Hiesey <john hiesey com>
Date: Wed Oct 7 17:34:17 2015 -0700
goutputstream: Report input stream read failure correctly
When G_OUTPUT_STREAM_CLOSE_TARGET is set,
g_output_stream_real_splice was not returning -1 in any error
cases, since the success flag was being overwritten.
https://bugzilla.gnome.org/show_bug.cgi?id=756255
gio/goutputstream.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index 035465d..1816e8d 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -605,7 +605,8 @@ g_output_stream_real_splice (GOutputStream *stream,
if (flags & G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET)
{
/* But write errors on close are bad! */
- res = g_output_stream_internal_close (stream, cancellable, error);
+ if (!g_output_stream_internal_close (stream, cancellable, error))
+ res = FALSE;
}
if (res)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]