]> git.ipfire.org Git - thirdparty/libvirt.git/commit
daemonStreamHandleRead: Wire up seekable stream
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 11 Apr 2016 09:58:19 +0000 (11:58 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 18 May 2017 05:42:13 +0000 (07:42 +0200)
commit89a0e69cec82eb1c50c90568eee2403e74a5f311
treecf2acfea84ef93b3c8ee269ed73ff166e16f2a39
parent31024b3d05d6a37202e3c6f6608333c27aeaccb8
daemonStreamHandleRead: Wire up seekable stream

Whenever client is able to receive some data from stream
daemonStreamHandleRead is called. But now the behaviour of this
function needs to be changed a bit. Previously it just read data
from underlying file (of chardev or whatever) and sent those
through the stream to client. This model will not work any longer
because it does not differentiate whether underlying file is in
data or hole section. Therefore, at the beginning of this
function add code that checks this situation and acts
accordingly.
So after the this, when wanting to send some data we always check
whether we are not in a hole and if so, skip it an inform client
about its size.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
daemon/stream.c