Revision b161d123 migration.c

b/migration.c
220 220

  
221 221
    dprintf("iterate\n");
222 222
    if (qemu_savevm_state_iterate(s->file) == 1) {
223
        int state;
223 224
        dprintf("done iterating\n");
224 225
        vm_stop(0);
225 226

  
226 227
        bdrv_flush_all();
227
        qemu_savevm_state_complete(s->file);
228
        s->state = MIG_STATE_COMPLETED;
228
        if ((qemu_savevm_state_complete(s->file)) < 0) {
229
            vm_start();
230
            state = MIG_STATE_ERROR;
231
        } else {
232
            state = MIG_STATE_COMPLETED;
233
        }
229 234
        migrate_fd_cleanup(s);
235
        s->state = state;
230 236
    }
231 237
}
232 238

  

Also available in: Unified diff