render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
Blob Blame History Raw
Index: src/xs_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/xs_internal.c,v
retrieving revision 1.88
diff -u -u -r1.88 xs_internal.c
--- src/xs_internal.c	5 Feb 2009 18:14:00 -0000	1.88
+++ src/xs_internal.c	11 Mar 2009 13:23:17 -0000
@@ -1215,7 +1215,7 @@
 static void
 xenStoreWatchEvent(int watch ATTRIBUTE_UNUSED,
                    int fd ATTRIBUTE_UNUSED,
-                   int events ATTRIBUTE_UNUSED,
+                   int events,
                    void *data)
 {
     char		 **event;
@@ -1226,8 +1226,12 @@
 
     virConnectPtr        conn = data;
     xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) conn->privateData;
+
     if(!priv) return;
 
+    /* only set a watch on read and write events */
+    if (events & (VIR_EVENT_HANDLE_ERROR | VIR_EVENT_HANDLE_HANGUP)) return;
+
     xenUnifiedLock(priv);
 
     if(!priv->xshandle)