[PATCH] qemu: migration: Drop dead VNC cookie handling

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

 



The only caller of this code is:

    for (i = 0; i < dom->def->ngraphics; i++) {
       if (dom->def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
           if (!(mig->graphics =
                 qemuMigrationCookieGraphicsAlloc(driver, dom->def->graphics[i])))
               return -1;
           mig->flags |= QEMU_MIGRATION_COOKIE_GRAPHICS;
           break;
       }
    }

So this is never triggered for VNC, and in fact VNC has no support for
seamless migration anyways so that seems correct. Drop the dead VNC
handling.
---
 src/qemu/qemu_migration.c | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 8d2ca3b..ca3619d 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -320,33 +320,21 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
         goto error;
 
     mig->type = def->type;
-    if (mig->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
-        mig->port = def->data.vnc.port;
-        listenAddr = virDomainGraphicsListenGetAddress(def, 0);
-        if (!listenAddr)
-            listenAddr = cfg->vncListen;
+    mig->port = def->data.spice.port;
+    if (cfg->spiceTLS)
+        mig->tlsPort = def->data.spice.tlsPort;
+    else
+        mig->tlsPort = -1;
+    listenAddr = virDomainGraphicsListenGetAddress(def, 0);
+    if (!listenAddr)
+        listenAddr = cfg->spiceListen;
 
 #ifdef WITH_GNUTLS
-        if (cfg->vncTLS &&
-            !(mig->tlsSubject = qemuDomainExtractTLSSubject(cfg->vncTLSx509certdir)))
-            goto error;
+    if (cfg->spiceTLS &&
+        !(mig->tlsSubject = qemuDomainExtractTLSSubject(cfg->spiceTLSx509certdir)))
+        goto error;
 #endif
-    } else {
-        mig->port = def->data.spice.port;
-        if (cfg->spiceTLS)
-            mig->tlsPort = def->data.spice.tlsPort;
-        else
-            mig->tlsPort = -1;
-        listenAddr = virDomainGraphicsListenGetAddress(def, 0);
-        if (!listenAddr)
-            listenAddr = cfg->spiceListen;
 
-#ifdef WITH_GNUTLS
-        if (cfg->spiceTLS &&
-            !(mig->tlsSubject = qemuDomainExtractTLSSubject(cfg->spiceTLSx509certdir)))
-            goto error;
-#endif
-    }
     if (VIR_STRDUP(mig->listen, listenAddr) < 0)
         goto error;
 
-- 
2.7.3

--
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]