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

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

 



Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
---
 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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]