render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
Blob Blame History Raw
From 4dffbf5c8beda557fd741c01287655e3a476f5d6 Mon Sep 17 00:00:00 2001
Message-Id: <4dffbf5c8beda557fd741c01287655e3a476f5d6@dist-git>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Wed, 29 Jun 2016 15:01:17 +0200
Subject: [PATCH] qemu: Drop useless SPICE migration code

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>
(cherry picked from commit f34b981e403ce7abf41c0047e1b5610e1f5269db)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_migration.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 6a683f7..0b1770b 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -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)
-- 
2.9.0