mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 03:21:44 +03:00
qemu: Do not return NULL when qemuMigrationSrcBegin succeeds
My recent commit v8.3.0-201-gc500955e95 tried to fix a regression which would cause the function to return success even if virCloseCallbacksSet failed. But due to a strange code flow in the function introduced an opposite regression. The function would return NULL on success when called without VIR_MIGRATE_CHANGE_PROTECTION flag. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
127fda5e84
commit
9c495f8fcb
@ -2534,23 +2534,23 @@ qemuMigrationSrcBegin(virConnectPtr conn,
|
|||||||
if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn,
|
if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn,
|
||||||
qemuMigrationSrcCleanup) < 0)
|
qemuMigrationSrcCleanup) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
qemuMigrationJobContinue(vm);
|
|
||||||
} else {
|
|
||||||
goto endjob;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = g_steal_pointer(&xml);
|
ret = g_steal_pointer(&xml);
|
||||||
|
|
||||||
|
endjob:
|
||||||
|
if (flags & VIR_MIGRATE_CHANGE_PROTECTION) {
|
||||||
|
if (ret)
|
||||||
|
qemuMigrationJobContinue(vm);
|
||||||
|
else
|
||||||
|
qemuMigrationJobFinish(vm);
|
||||||
|
} else {
|
||||||
|
qemuDomainObjEndJob(vm);
|
||||||
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainObjEndAPI(&vm);
|
virDomainObjEndAPI(&vm);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
endjob:
|
|
||||||
if (flags & VIR_MIGRATE_CHANGE_PROTECTION)
|
|
||||||
qemuMigrationJobFinish(vm);
|
|
||||||
else
|
|
||||||
qemuDomainObjEndJob(vm);
|
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user