mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
qemu_migration_cookie: Make cookie parsing robust against missing domain job
In testing code we don't properly populate the job sometimes. If it isn't populated we should not touch it though in the migration cookie code. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ed2e78089b
commit
f8b0866878
@ -1429,7 +1429,7 @@ qemuMigrationCookieParse(virQEMUDriverPtr driver,
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo)
|
||||
if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo && priv->job.current)
|
||||
mig->jobInfo->operation = priv->job.current->operation;
|
||||
|
||||
return g_steal_pointer(&mig);
|
||||
|
Loading…
x
Reference in New Issue
Block a user