]> git.ipfire.org Git - thirdparty/libvirt.git/commit
daemonStreamHandleWriteData: Preserve error when aborting stream
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 12 Mar 2018 09:18:05 +0000 (10:18 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 15 Mar 2018 07:25:59 +0000 (08:25 +0100)
commit92a5d12157a7286ec775bd47c6bde29ec63b91d1
tree68d8e214188f17406ee36e056b29d69939550f6e
parentbc01d903c2931ba87fc0da63d17ccdb02c35cddf
daemonStreamHandleWriteData: Preserve error when aborting stream

The daemonStreamHandleWriteData() function is called whenever
server side of stream is able to receive some data. Nevertheless,
it calls virStreamSend() (to pass data down to virFDStream) and
depending on its return value it may abort the stream. However,
the functions it called when doing so are public APIs and as such
reset any error set previously. Therefore, if there was any error
in writing data to stream (i.e. repored in virStreamSend) it is
reset before virNetServerProgramSendReplyError() can get to it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/remote/remote_daemon_stream.c