summaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2010-05-11 22:39:51 +0200
committerJuan Quintela <quintela@redhat.com>2011-10-20 13:23:51 +0200
commite6494061690df2af7368752f35f5c22b5856e83c (patch)
treefb786f0768a87a7493f4ee6eb39094a60dd7995c /migration.c
parentc0b2ba46c5ceb806a1639bb86b0b457309674b23 (diff)
downloadqemu-e6494061690df2af7368752f35f5c22b5856e83c.tar.gz
qemu-e6494061690df2af7368752f35f5c22b5856e83c.tar.bz2
qemu-e6494061690df2af7368752f35f5c22b5856e83c.zip
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>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration.c b/migration.c
index 7fd6c23fa5..71b8aade8b 100644
--- a/migration.c
+++ b/migration.c
@@ -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;
}