mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 05:13:54 -06:00
migration: Check that migration is active before cancel it
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
c0b2ba46c5
commit
e649406169
1 changed files with 2 additions and 2 deletions
|
@ -133,9 +133,9 @@ int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
|||
{
|
||||
MigrationState *s = current_migration;
|
||||
|
||||
if (s)
|
||||
if (s && s->get_status(s) == MIG_STATE_ACTIVE) {
|
||||
s->cancel(s);
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue