migration: move qemu_fclose to process_incoming_migration

The common suffix is now just process_incoming_migration.

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2012-08-07 10:51:51 +02:00
parent ab52a824a4
commit 1c12e1f5b2
5 changed files with 5 additions and 5 deletions

View File

@ -87,7 +87,6 @@ static void exec_accept_incoming_migration(void *opaque)
qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
process_incoming_migration(f);
qemu_fclose(f);
}
void exec_start_incoming_migration(const char *command, Error **errp)

View File

@ -91,7 +91,6 @@ static void fd_accept_incoming_migration(void *opaque)
qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
process_incoming_migration(f);
qemu_fclose(f);
}
void fd_start_incoming_migration(const char *infd, Error **errp)

View File

@ -102,7 +102,6 @@ static void tcp_accept_incoming_migration(void *opaque)
}
process_incoming_migration(f);
qemu_fclose(f);
return;
out:

View File

@ -102,7 +102,6 @@ static void unix_accept_incoming_migration(void *opaque)
}
process_incoming_migration(f);
qemu_fclose(f);
return;
out:

View File

@ -85,7 +85,11 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
void process_incoming_migration(QEMUFile *f)
{
if (qemu_loadvm_state(f) < 0) {
int ret;
ret = qemu_loadvm_state(f);
qemu_fclose(f);
if (ret < 0) {
fprintf(stderr, "load of migration failed\n");
exit(0);
}