]> xenbits.xensource.com Git - libvirt.git/commit
Fix sending of reply to final RPC message
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 8 Jul 2011 11:54:29 +0000 (12:54 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 8 Jul 2011 15:19:57 +0000 (16:19 +0100)
commit3cfdc57b8553cae95b8849bbcb7a4b227085cec1
tree90776abff880c3f0c4bd0748b84fd34488d0aeb1
parentafe8839f011c8c54c429f33ca0e6515fceb4e0fd
Fix sending of reply to final RPC message

The dispatch for the CLOSE RPC call was invoking the method
virNetServerClientClose(). This caused the client connection
to be immediately terminated. This meant the reply to the
final RPC message was never sent. Prior to the RPC rewrite
we merely flagged the connection for closing, and actually
closed it when the next RPC call dispatch had completed.

* daemon/remote.c: Flag connection for a delayed close
* daemon/stream.c: Update to use new API for closing
  failed connection
* src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h:
  Add support for a delayed connection close. Rename the
  virNetServerClientMarkClose method to virNetServerClientImmediateClose
  to clarify its semantics
daemon/remote.c
daemon/stream.c
src/rpc/virnetserverclient.c
src/rpc/virnetserverclient.h