On 13.10.2015 15:38, Erik Skultety wrote:
In order to be able to react to upcoming daemon events (disconnect,
keepalive,
...), we need to register asynchronous polling so that our event loop can
detect events on a file descriptor.
---
src/libvirt-admin.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/libvirt-admin.c b/src/libvirt-admin.c
index 252fdbe..3d74d5f 100644
--- a/src/libvirt-admin.c
+++ b/src/libvirt-admin.c
@@ -160,6 +160,12 @@ remoteAdminConnectOpen(virAdmConnectPtr conn, unsigned int flags)
args.flags = flags;
+ if (virNetClientRegisterAsyncIO(priv->client) < 0) {
+ VIR_DEBUG("Failed to add event watch, disabling events and support
for"
+ " keepalive messages");
+ virResetLastError();
+ }
+
virObjectRef(conn->closeCallback);
virNetClientSetCloseCallback(priv->client, remoteAdminClientCloseFunc,
conn->closeCallback,
Aha! This is the commit that enables the feature. I think you want to
squash it into 4/9.
ACK
Michal