From: Matthias Bolte Date: Sat, 24 Oct 2009 17:20:33 +0000 (+0200) Subject: Fix problems in the Xen inotify driver. X-Git-Tag: v0.7.3~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74c81b5d932edd19793064876bf686a22a06128d;p=thirdparty%2Flibvirt.git Fix problems in the Xen inotify driver. In xenInotifyXendDomainsDirLookup() the wrong UUID variable is used to search in the config info list. In xenInotifyEvent() the event is dispatched if it's NULL. Both were introduced in bc898df2c74fe3c8efedfbbd430737bac950e65e. --- diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c index 9e0407f011..aa3893ab33 100644 --- a/src/xen/xen_inotify.c +++ b/src/xen/xen_inotify.c @@ -142,7 +142,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename, search for, and create a domain from the stored list info */ for (i = 0 ; i < priv->configInfoList->count ; i++) { - if (!memcmp(uuid, priv->configInfoList->doms[i]->uuid, VIR_UUID_BUFLEN)) { + if (!memcmp(rawuuid, priv->configInfoList->doms[i]->uuid, VIR_UUID_BUFLEN)) { *name = strdup(priv->configInfoList->doms[i]->name); if (!*name) { virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR, @@ -332,7 +332,7 @@ reread: xenInotifyDomainEventFromFile(conn, fname, VIR_DOMAIN_EVENT_UNDEFINED, VIR_DOMAIN_EVENT_UNDEFINED_REMOVED); - if (!event) + if (event) xenUnifiedDomainEventDispatch(conn->privateData, event); else virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,