]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Drop useless SPICE migration code
authorJiri Denemark <jdenemar@redhat.com>
Wed, 29 Jun 2016 13:01:17 +0000 (15:01 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 8 Jul 2016 11:36:00 +0000 (13:36 +0200)
The spiceMigration flag will never be true if there is no SPICE graphics
configured for the domain.

https://bugzilla.redhat.com/show_bug.cgi?id=1151723

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_migration.c

index 6a683f7de4b5230393a4d334e204ed02a0d5e089..0b1770b28945025b603856b593cb581947fefb09 100644 (file)
@@ -2522,23 +2522,11 @@ static int
 qemuMigrationWaitForSpice(virDomainObjPtr vm)
 {
     qemuDomainObjPrivatePtr priv = vm->privateData;
-    bool wait_for_spice = false;
-    size_t i = 0;
 
     if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SEAMLESS_MIGRATION) ||
         !priv->job.spiceMigration)
         return 0;
 
-    for (i = 0; i < vm->def->ngraphics; i++) {
-        if (vm->def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
-            wait_for_spice = true;
-            break;
-        }
-    }
-
-    if (!wait_for_spice)
-        return 0;
-
     VIR_DEBUG("Waiting for SPICE to finish migration");
     while (!priv->job.spiceMigrated && !priv->job.abortJob) {
         if (virDomainObjWait(vm) < 0)