]> git.proxmox.com Git - qemu.git/blobdiff - migration-exec.c
pc: move rtc declarations from pc.h into a dedicated header file.
[qemu.git] / migration-exec.c
index 3edc02600962c120ee9704c2e09e07d686ea32b6..54358271c5b5b5793b2989f4e2cbbe92609b83f4 100644 (file)
@@ -120,12 +120,12 @@ static void exec_accept_incoming_migration(void *opaque)
     }
     qemu_announce_self();
     DPRINTF("successfully loaded vm state\n");
-    /* we've successfully migrated, close the fd */
-    qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL);
+
     if (autostart)
         vm_start();
 
 err:
+    qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL);
     qemu_fclose(f);
 }
 
@@ -141,8 +141,7 @@ int exec_start_incoming_migration(const char *command)
     }
 
     qemu_set_fd_handler2(qemu_stdio_fd(f), NULL,
-                        exec_accept_incoming_migration, NULL,
-                        (void *)(unsigned long)f);
+                        exec_accept_incoming_migration, NULL, f);
 
     return 0;
 }