Don't close stream twice when splicing
authorPhilip Withnall <philip@tecnocode.co.uk>
Mon, 19 Sep 2011 08:13:52 +0000 (10:13 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 19 Sep 2011 08:13:52 +0000 (10:13 +0200)
commitfe27bf003764e453cd15cab67e8a99fcda84db1d
tree3c03a721373c74cf112b5f95072586fd126a85ac
parent808035666ac2f730b8819232f86cd3fac9de0d44
Don't close stream twice when splicing

Ensure that the output/target stream in a g_output_stream_splice_async()
operation is marked as closed if G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET is
passed to g_output_stream_splice_async(). This removes the possibility of
local FDs being closed twice because the stream's not marked as closed.

This is implemented by calling g_output_stream_close() from within
g_output_stream_splice_async() instead of calling the stream's close_fn()
directly.

Closes: bgo#659324
gio/goutputstream.c