diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 64c656ef2f..49bde48c01 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3935,7 +3935,8 @@ qemuMigrationSrcConfirmPhase(virQEMUDriver *driver, if (qemuMigrationJobStartPhase(vm, phase) < 0) return -1; - if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv, + if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, + priv->qemuCaps, cookiein, cookieinlen, QEMU_MIGRATION_COOKIE_STATS))) return -1; @@ -4768,7 +4769,8 @@ qemuMigrationSrcRun(virQEMUDriver *driver, } } - mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv, + mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, + priv->qemuCaps, cookiein, cookieinlen, cookieFlags | QEMU_MIGRATION_COOKIE_GRAPHICS | @@ -5058,7 +5060,8 @@ qemuMigrationSrcResume(virDomainObj *vm, VIR_DEBUG("vm=%p", vm); - mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv, + mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, + priv->qemuCaps, cookiein, cookieinlen, QEMU_MIGRATION_COOKIE_CAPS); if (!mig) @@ -6456,7 +6459,8 @@ qemuMigrationDstFinishOffline(virQEMUDriver *driver, qemuDomainObjPrivate *priv = vm->privateData; g_autoptr(qemuMigrationCookie) mig = NULL; - if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv, + if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, + priv->qemuCaps, cookiein, cookieinlen, cookie_flags))) return NULL; @@ -6652,7 +6656,8 @@ qemuMigrationDstFinishActive(virQEMUDriver *driver, VIR_DEBUG("vm=%p, flags=0x%lx, retcode=%d", vm, flags, retcode); - if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv, + if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, + priv->qemuCaps, cookiein, cookieinlen, cookie_flags))) goto error; diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index da12f58bda..e151f33e99 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -1493,7 +1493,7 @@ qemuMigrationCookieParse(virQEMUDriver *driver, virDomainObj *vm, const virDomainDef *def, const char *origname, - qemuDomainObjPrivate *priv, + virQEMUCaps *qemuCaps, const char *cookiein, int cookieinlen, unsigned int flags) @@ -1514,11 +1514,7 @@ qemuMigrationCookieParse(virQEMUDriver *driver, return NULL; if (cookiein && cookieinlen && - qemuMigrationCookieXMLParseStr(mig, - driver, - priv ? priv->qemuCaps : NULL, - cookiein, - flags) < 0) + qemuMigrationCookieXMLParseStr(mig, driver, qemuCaps, cookiein, flags) < 0) return NULL; if (flags & QEMU_MIGRATION_COOKIE_PERSISTENT && diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu/qemu_migration_cookie.h index f9927175fa..0fc406761b 100644 --- a/src/qemu/qemu_migration_cookie.h +++ b/src/qemu/qemu_migration_cookie.h @@ -192,7 +192,7 @@ qemuMigrationCookieParse(virQEMUDriver *driver, virDomainObj *vm, const virDomainDef *def, const char *origname, - qemuDomainObjPrivate *priv, + virQEMUCaps *qemuCaps, const char *cookiein, int cookieinlen, unsigned int flags); diff --git a/tests/qemumigrationcookiexmltest.c b/tests/qemumigrationcookiexmltest.c index bb19baad54..0e5f956a2a 100644 --- a/tests/qemumigrationcookiexmltest.c +++ b/tests/qemumigrationcookiexmltest.c @@ -144,7 +144,7 @@ testQemuMigrationCookieParse(const void *opaque) data->vm, data->vm->def, NULL, - priv, + priv->qemuCaps, data->xmlstr, data->xmlstrlen, data->cookieParseFlags))) {