From: Anthony Liguori Date: Thu, 9 Jul 2009 18:25:47 +0000 (-0500) Subject: Make sure to only vm_start() a failed migration if we were running to begin X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~11485 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eeb34af986c28b8da4001d947d66e2efaaad0e66;p=sdk%2Femulator%2Fqemu.git Make sure to only vm_start() a failed migration if we were running to begin with. Signed-off-by: Anthony Liguori --- diff --git a/migration.c b/migration.c index 190b37e..e6c8b16 100644 --- a/migration.c +++ b/migration.c @@ -261,12 +261,16 @@ void migrate_fd_put_ready(void *opaque) dprintf("iterate\n"); if (qemu_savevm_state_iterate(s->file) == 1) { int state; + int old_vm_running = vm_running; + dprintf("done iterating\n"); vm_stop(0); bdrv_flush_all(); if ((qemu_savevm_state_complete(s->file)) < 0) { - vm_start(); + if (old_vm_running) { + vm_start(); + } state = MIG_STATE_ERROR; } else { state = MIG_STATE_COMPLETED;