[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 4/6] Disable errors if Perform failed at the libvirt.c level.



Signed-off-by: Cole Robinson <crobinso redhat com>
---
 src/libvirt.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index 2c50790..2bb24e1 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -3032,6 +3032,10 @@ virDomainMigrateVersion2 (virDomainPtr domain,
     ret = domain->conn->driver->domainMigratePerform
         (domain, cookie, cookielen, uri, flags, dname, bandwidth);
 
+    /* Perform failed. Disable error reporting to 'Finish' doesn't squash */
+    if (ret < 0)
+        virDisableErrors();
+
     /* In version 2 of the migration protocol, we pass the
      * status code from the sender to the destination host,
      * so it can do any cleanup if the migration failed.
@@ -3041,6 +3045,7 @@ virDomainMigrateVersion2 (virDomainPtr domain,
         (dconn, dname, cookie, cookielen, uri, flags, ret);
 
  done:
+    virEnableErrors();
     VIR_FREE (uri_out);
     VIR_FREE (cookie);
     return ddomain;
-- 
1.6.5.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]