]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix synchronous reading of stream data
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 21 Sep 2011 13:51:33 +0000 (14:51 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 23 Sep 2011 14:18:20 +0000 (15:18 +0100)
commitcb61009236a96f16fa7eabc92f5d6ed5f6313163
tree1e880c7c12e8bdc5590e0c1cf761f8453d3805ac
parent1888363d8bfd2ac165ddfd495624a449b0df9d58
Fix synchronous reading of stream data

commit 984840a2c292402926ad100aeea33f8859ff31a9 removed the
notification of waiting calls when VIR_NET_CONTINUE messages
arrive. This was to fix the case of a virStreamAbort() call
being prematurely notified of completion.

The problem is that sometimes there are dummy calls from a
virStreamRecv() call waiting that *do* need to be notified.

These dummy calls should have a status VIR_NET_CONTINUE. So
re-add the notification upon VIR_NET_CONTINUE, but only if
the waiter also has a status of VIR_NET_CONTINUE.

* src/rpc/virnetclient.c: Notify waiting call if stream data
  arrives
* src/rpc/virnetclientstream.c:  Mark dummy stream read packet
  with status VIR_NET_CONTINUE
src/rpc/virnetclient.c
src/rpc/virnetclientstream.c