render / rpms / libvirt

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