On 06/28/2011 11:01 AM, Daniel P. Berrange wrote:
When the remote client receives end of file on the stream
it never invokes the stream callback. Applications relying
on async event driven I/O will thus never see the EOF
condition on the stream
* src/rpc/virnetclient.c, src/rpc/virnetclientstream.c:
Ensure EOF is dispatched
---
src/rpc/virnetclient.c | 3 --
src/rpc/virnetclientstream.c | 43 ++++++++++++++++++++++++-----------------
2 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index dc0ce51..39bdf14 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -580,9 +580,6 @@ static int virNetClientCallDispatchStream(virNetClientPtr client)
if (thecall && thecall->expectReply) {
VIR_DEBUG("Got sync data packet completion");
thecall->mode = VIR_NET_CLIENT_MODE_COMPLETE;
- } else {
- // XXX
- //remoteStreamEventTimerUpdate(privst);
Not strictly related, but doesn't hurt.
ACK.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org