]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virfdstream: Check for thread error more frequently
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 29 May 2017 14:29:11 +0000 (16:29 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 11 Jul 2017 06:40:13 +0000 (08:40 +0200)
commit3a2ca2fbe4f9d6a593a8ccb2b77b0e18571e8cb0
tree98fd700d5494c801a9ca79f5028862c079386788
parent405c0f07f5c444c52bd6cc95476753c7c8b2ffe2
virfdstream: Check for thread error more frequently

When the I/O thread quits (e.g. due to an I/O error, lseek()
error, whatever), any subsequent virFDStream API should return
error too. Moreover, when invoking stream event callback, we must
set the VIR_STREAM_EVENT_ERROR flag so that the callback knows
something bad happened.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/util/virfdstream.c