diff options
author | malc | 2011-08-08 11:37:44 +0200 |
---|---|---|
committer | malc | 2011-08-08 11:37:44 +0200 |
commit | 9f058c19fcf53c77af15894937ccb380381649c3 (patch) | |
tree | 7a48577ab755f7221bcd696a68f35616cd1fa296 /migration.c | |
parent | Merge branch 'master' of git://git.qemu.org/qemu (diff) | |
parent | Fix forcing multicast msgs to loopback on OpenBSD. (diff) | |
download | qemu-9f058c19fcf53c77af15894937ccb380381649c3.tar.gz qemu-9f058c19fcf53c77af15894937ccb380381649c3.tar.xz qemu-9f058c19fcf53c77af15894937ccb380381649c3.zip |
Merge branch 'master' of git://git.qemu.org/qemu
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/migration.c b/migration.c index 2a15b98db9..756fa6261f 100644 --- a/migration.c +++ b/migration.c @@ -292,18 +292,17 @@ int migrate_fd_cleanup(FdMigrationState *s) ret = -1; } s->file = NULL; + } else { + if (s->mon) { + monitor_resume(s->mon); + } } - if (s->fd != -1) + if (s->fd != -1) { close(s->fd); - - /* Don't resume monitor until we've flushed all of the buffers */ - if (s->mon) { - monitor_resume(s->mon); + s->fd = -1; } - s->fd = -1; - return ret; } @@ -330,9 +329,6 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size) if (ret == -EAGAIN) { qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify, s); } else if (ret < 0) { - if (s->mon) { - monitor_resume(s->mon); - } s->state = MIG_STATE_ERROR; notifier_list_notify(&migration_state_notifiers, NULL); } @@ -458,6 +454,9 @@ int migrate_fd_close(void *opaque) { FdMigrationState *s = opaque; + if (s->mon) { + monitor_resume(s->mon); + } qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); return s->close(s); } |