qemu_driver.c: honor dname parameter once again

Since c26cb9234f4b9fa46d7caa3385ae36704167c53f, the dname
parameter has been ignored by these two functions.  Use it.
* src/qemu/qemu_driver.c (qemudDomainMigratePrepareTunnel): Honor dname
parameter once again.
(qemudDomainMigratePrepare2): Likewise.
This commit is contained in:
Jim Meyering 2010-02-11 16:46:21 +01:00
parent 18e0cc7f72
commit 618e1ab349

View File

@ -7434,7 +7434,12 @@ qemudDomainMigratePrepareTunnel(virConnectPtr dconn,
}
/* Target domain name, maybe renamed. */
dname = dname ? dname : def->name;
if (dname) {
VIR_FREE(def->name);
def->name = strdup(dname);
if (def->name == NULL)
goto cleanup;
}
if (virDomainObjIsDuplicate(&driver->domains, def, 1) < 0)
goto cleanup;
@ -7660,7 +7665,12 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
}
/* Target domain name, maybe renamed. */
dname = dname ? dname : def->name;
if (dname) {
VIR_FREE(def->name);
def->name = strdup(dname);
if (def->name == NULL)
goto cleanup;
}
if (virDomainObjIsDuplicate(&driver->domains, def, 1) < 0)
goto cleanup;