From bdd68947137e76952d8b8c7853686e2c80132c29 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 11 Mar 2009 13:43:24 +0000 Subject: [PATCH] * src/xs_internal.c: fix xen events handling problem (Dan Berrange) Daniel --- ChangeLog | 6 +++++- src/xs_internal.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7126f9dac..03a973f6a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ +Wed Mar 11 14:42:24 CET 2009 Daniel Veillard + + * src/xs_internal.c: fix xen events handling problem (Dan Berrange) + Tue Mar 10 12:03:37 CET 2009 Daniel Veillard - * src/xend_internal.c: fix an allocation problem in + * src/xend_internal.c: fix an allocation problem in xenDaemonDomainLookupByName_ids Tue Mar 10 10:29:46 GMT 2009 Daniel P. Berrange diff --git a/src/xs_internal.c b/src/xs_internal.c index 298bee802b..50cc575f80 100644 --- a/src/xs_internal.c +++ b/src/xs_internal.c @@ -1215,7 +1215,7 @@ xenStoreFindWatch(xenStoreWatchListPtr list, 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 @@ xenStoreWatchEvent(int watch ATTRIBUTE_UNUSED, 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) -- GitLab