render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
Mark McLoughlin 38cf1b
From 7692e1e19487c28454b1e5f6488d5574c70883f2 Mon Sep 17 00:00:00 2001
Mark McLoughlin 7c2073
From: Chris Lalancette <clalance@redhat.com>
Mark McLoughlin 7c2073
Date: Mon, 21 Sep 2009 14:53:31 +0200
Mark McLoughlin 7c2073
Subject: [PATCH] Don't do virSetConnError when virDrvSupportsFeature is successful.
Mark McLoughlin 7c2073
Mark McLoughlin 7c2073
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Mark McLoughlin 7c2073
Fedora-patch: libvirt-fix-drv-supports-feature-bogus-error.patch
Mark McLoughlin 7c2073
---
Mark McLoughlin 7c2073
 src/libvirt.c |    7 +++++--
Mark McLoughlin 7c2073
 1 files changed, 5 insertions(+), 2 deletions(-)
Mark McLoughlin 7c2073
Mark McLoughlin 7c2073
diff --git a/src/libvirt.c b/src/libvirt.c
Mark McLoughlin 7c2073
index 4a11688..fa59dc7 100644
Mark McLoughlin 7c2073
--- a/src/libvirt.c
Mark McLoughlin 7c2073
+++ b/src/libvirt.c
Mark McLoughlin 7c2073
@@ -1349,8 +1349,11 @@ virDrvSupportsFeature (virConnectPtr conn, int feature)
Mark McLoughlin 7c2073
     }
Mark McLoughlin 7c2073
 
Mark McLoughlin 7c2073
     ret = VIR_DRV_SUPPORTS_FEATURE (conn->driver, conn, feature);
Mark McLoughlin 7c2073
-    /* Copy to connection error object for back compatability */
Mark McLoughlin 7c2073
-    virSetConnError(conn);
Mark McLoughlin 7c2073
+
Mark McLoughlin 7c2073
+    if (ret < 0)
Mark McLoughlin 7c2073
+        /* Copy to connection error object for back compatability */
Mark McLoughlin 7c2073
+        virSetConnError(conn);
Mark McLoughlin 7c2073
+
Mark McLoughlin 7c2073
     return ret;
Mark McLoughlin 7c2073
 }
Mark McLoughlin 7c2073
 
Mark McLoughlin 7c2073
-- 
Mark McLoughlin 7c2073
1.6.2.5
Mark McLoughlin 7c2073