diff options
author | Juan Quintela <quintela@redhat.com> | 2010-06-09 14:10:55 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-06-22 15:15:51 -0500 |
commit | 511c0231033eb8fbdf2a615b429e1bc6b5aad52c (patch) | |
tree | 4377589c1b26e1c151a0356adaa40f06cb4438b1 /migration-tcp.c | |
parent | 8ca5e8011857fc59074f342bec1e8ee69410e522 (diff) |
Factorize common migration incoming code
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration-tcp.c')
-rw-r--r-- | migration-tcp.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/migration-tcp.c b/migration-tcp.c index 43af2e0450..78b56dc3f6 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@ -141,7 +141,7 @@ static void tcp_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); @@ -160,18 +160,7 @@ static void tcp_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"); - - if (autostart) - vm_start(); - -out_fopen: + process_incoming_migration(f); qemu_fclose(f); out: qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL); |