]> git.proxmox.com Git - qemu.git/blobdiff - migration-unix.c
vnc: tight: fix rgb_prepare_row
[qemu.git] / migration-unix.c
index b7aab3843aa44138e5f6a72456692c76e4cc7d03..57232c07a934156ff8948418970ce925d0da5191 100644 (file)
@@ -149,7 +149,7 @@ static void unix_accept_incoming_migration(void *opaque)
     socklen_t addrlen = sizeof(addr);
     int s = (unsigned long)opaque;
     QEMUFile *f;
-    int c, ret;
+    int c;
 
     do {
         c = qemu_accept(s, (struct sockaddr *)&addr, &addrlen);
@@ -168,21 +168,11 @@ static void unix_accept_incoming_migration(void *opaque)
         goto out;
     }
 
-    ret = qemu_loadvm_state(f);
-    if (ret < 0) {
-        fprintf(stderr, "load of migration failed\n");
-        goto out_fopen;
-    }
-    qemu_announce_self();
-    DPRINTF("successfully loaded vm state\n");
-
-    /* we've successfully migrated, close the server socket */
-    qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL);
-    close(s);
-
-out_fopen:
+    process_incoming_migration(f);
     qemu_fclose(f);
 out:
+    qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL);
+    close(s);
     close(c);
 }