libvirt/libvirt-0.6.1-xen-events.patch
Daniel P. Berrange 511f6cd625 - Fix memory allocation for xend lookup
- Avoid crash if storage volume deletion fails
- Fix multiple FD leaks
- Fix bug in dispatch FD events when a callback is marked deleted
- Fix parsing of storage volume owner/group/mode
- Fix memory allocation for virDomainGetVcpus RPC handler
- Avoid deadlock in setting vCPU count
- Use correct driver name in Xen block detach
2009-03-17 10:29:42 +00:00

30 lines
917 B
Diff

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)