[PATCH v2 1/2] qemuMigrationCookieAddPersistent: change argument type

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

 



It wasn't possible to add XML not assigned to a domain because
virDomainObjPtr was an argument type.
---
 src/qemu/qemu_migration.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 38fa81c..92d2ce9 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -507,7 +507,7 @@ qemuMigrationCookieAddLockstate(qemuMigrationCookiePtr mig,
 
 static int
 qemuMigrationCookieAddPersistent(qemuMigrationCookiePtr mig,
-                                 virDomainObjPtr dom)
+                                 virDomainDefPtr def)
 {
     if (mig->flags & QEMU_MIGRATION_COOKIE_PERSISTENT) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -515,10 +515,10 @@ qemuMigrationCookieAddPersistent(qemuMigrationCookiePtr mig,
         return -1;
     }
 
-    if (!dom->newDef)
+    if (!def)
         return 0;
 
-    mig->persistent = dom->newDef;
+    mig->persistent = def;
     mig->flags |= QEMU_MIGRATION_COOKIE_PERSISTENT;
     mig->flagsMandatory |= QEMU_MIGRATION_COOKIE_PERSISTENT;
     return 0;
@@ -1367,7 +1367,7 @@ qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
         return -1;
 
     if (flags & QEMU_MIGRATION_COOKIE_PERSISTENT &&
-        qemuMigrationCookieAddPersistent(mig, dom) < 0)
+        qemuMigrationCookieAddPersistent(mig, dom->newDef) < 0)
         return -1;
 
     if (flags & QEMU_MIGRATION_COOKIE_NETWORK &&
-- 
1.8.3.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]