[libvirt] [PATCH 9/9] Ensure that EOF is dispatched to the stream callback

Eric Blake eblake at redhat.com
Tue Jun 28 18:21:25 UTC 2011


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 at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110628/7674a32c/attachment-0001.sig>


More information about the libvir-list mailing list