qemu: migration: Drop dead VNC cookie handling

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.
This commit is contained in:
Cole Robinson 2016-04-13 11:06:42 -04:00
parent ab517a5ccb
commit dae0e22714

View File

@ -314,8 +314,8 @@ qemuDomainExtractTLSSubject(const char *certdir)
#endif #endif
static qemuMigrationCookieGraphicsPtr static qemuMigrationCookieGraphicsPtr
qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver, qemuMigrationCookieGraphicsSpiceAlloc(virQEMUDriverPtr driver,
virDomainGraphicsDefPtr def) virDomainGraphicsDefPtr def)
{ {
qemuMigrationCookieGraphicsPtr mig = NULL; qemuMigrationCookieGraphicsPtr mig = NULL;
const char *listenAddr; const char *listenAddr;
@ -326,33 +326,20 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
goto error; goto error;
mig->type = def->type; mig->type = def->type;
if (mig->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) { mig->port = def->data.spice.port;
mig->port = def->data.vnc.port; if (cfg->spiceTLS)
mig->tlsPort = def->data.spice.tlsPort;
else
mig->tlsPort = -1;
if (!gListen || !(listenAddr = gListen->address)) if (!gListen || !(listenAddr = gListen->address))
listenAddr = cfg->vncListen; listenAddr = cfg->spiceListen;
#ifdef WITH_GNUTLS #ifdef WITH_GNUTLS
if (cfg->vncTLS && if (cfg->spiceTLS &&
!(mig->tlsSubject = qemuDomainExtractTLSSubject(cfg->vncTLSx509certdir))) !(mig->tlsSubject = qemuDomainExtractTLSSubject(cfg->spiceTLSx509certdir)))
goto error; goto error;
#endif #endif
} else {
mig->port = def->data.spice.port;
if (cfg->spiceTLS)
mig->tlsPort = def->data.spice.tlsPort;
else
mig->tlsPort = -1;
if (!gListen || !(listenAddr = gListen->address))
listenAddr = cfg->spiceListen;
#ifdef WITH_GNUTLS
if (cfg->spiceTLS &&
!(mig->tlsSubject = qemuDomainExtractTLSSubject(cfg->spiceTLSx509certdir)))
goto error;
#endif
}
if (VIR_STRDUP(mig->listen, listenAddr) < 0) if (VIR_STRDUP(mig->listen, listenAddr) < 0)
goto error; goto error;
@ -467,7 +454,8 @@ qemuMigrationCookieAddGraphics(qemuMigrationCookiePtr mig,
for (i = 0; i < dom->def->ngraphics; i++) { for (i = 0; i < dom->def->ngraphics; i++) {
if (dom->def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) { if (dom->def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
if (!(mig->graphics = if (!(mig->graphics =
qemuMigrationCookieGraphicsAlloc(driver, dom->def->graphics[i]))) qemuMigrationCookieGraphicsSpiceAlloc(driver,
dom->def->graphics[i])))
return -1; return -1;
mig->flags |= QEMU_MIGRATION_COOKIE_GRAPHICS; mig->flags |= QEMU_MIGRATION_COOKIE_GRAPHICS;
break; break;