daemon: fix wrong request count for sparse stream

Similar to when actual data is being written to the stream, it is
necessary to acknowledge handling of the client request when a hole is
encountered. This is done later in daemonStreamHandleWrite by sending a
fake zero-length reply if the status variable is set to
VIR_STREAM_CONTINUE. It seems that setting status from the message
header was missed for holes in the introduction of the sparse stream
feature.

Signed-off-by: Vincent Vanlaer <libvirt-e6954efa@volkihar.be>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Vincent Vanlaer 2024-02-19 23:24:02 +01:00 committed by Michal Privoznik
parent 7b694f43f2
commit 93d67c58c2

View File

@ -747,6 +747,7 @@ daemonStreamHandleWrite(virNetServerClient *client,
* Otherwise just carry on with processing stream
* data. */
ret = daemonStreamHandleHole(client, stream, msg);
status = msg->header.status;
} else if (msg->header.type == VIR_NET_STREAM) {
status = msg->header.status;
switch (status) {