diff options
author | Juan Quintela <quintela@redhat.com> | 2010-05-11 22:39:51 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2011-10-20 13:23:51 +0200 |
commit | e6494061690df2af7368752f35f5c22b5856e83c (patch) | |
tree | fb786f0768a87a7493f4ee6eb39094a60dd7995c /migration.c | |
parent | c0b2ba46c5ceb806a1639bb86b0b457309674b23 (diff) |
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.c | 4 |
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; } |