diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-08-07 10:51:51 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-11-02 18:35:07 +0100 |
commit | 1c12e1f5b2ce215ee25b4a4e365e76269edf911c (patch) | |
tree | 9c95700eae8d0cfb104ee1eed8af15b45ab43f1f | |
parent | ab52a824a496f4459539a9a11152d6da68703ea0 (diff) |
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>
-rw-r--r-- | migration-exec.c | 1 | ||||
-rw-r--r-- | migration-fd.c | 1 | ||||
-rw-r--r-- | migration-tcp.c | 1 | ||||
-rw-r--r-- | migration-unix.c | 1 | ||||
-rw-r--r-- | migration.c | 6 |
5 files changed, 5 insertions, 5 deletions
diff --git a/migration-exec.c b/migration-exec.c index 2ce7770cfa..2b6fcb4262 100644 --- a/migration-exec.c +++ b/migration-exec.c @@ -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) diff --git a/migration-fd.c b/migration-fd.c index c678b23b7e..5fe28e09fd 100644 --- a/migration-fd.c +++ b/migration-fd.c @@ -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) diff --git a/migration-tcp.c b/migration-tcp.c index 1279cc9677..5e855fe72f 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@ -102,7 +102,6 @@ static void tcp_accept_incoming_migration(void *opaque) } process_incoming_migration(f); - qemu_fclose(f); return; out: diff --git a/migration-unix.c b/migration-unix.c index 96ea71b787..dba72b4a54 100644 --- a/migration-unix.c +++ b/migration-unix.c @@ -102,7 +102,6 @@ static void unix_accept_incoming_migration(void *opaque) } process_incoming_migration(f); - qemu_fclose(f); return; out: diff --git a/migration.c b/migration.c index a63596f9a0..2741d979fc 100644 --- a/migration.c +++ b/migration.c @@ -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); } |