Message ID | 26dc4cc40ec26fe309147639a46334ca393cb1b8.1316524908.git.quintela@redhat.com |
---|---|
State | New |
Headers | show |
On 09/20/2011 03:24 PM, Juan Quintela wrote: > > diff --git a/migration.c b/migration.c > index c56d29c..7f8928a 100644 > --- a/migration.c > +++ b/migration.c > @@ -312,6 +312,9 @@ void migrate_fd_put_notify(void *opaque) > > qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); > qemu_file_put_notify(s->file); > + if (qemu_file_has_error(s->file)) { > + migrate_fd_error(s); > + } Note this is testing QEMUFile's has_error, not QEMUBufferedFile's. Merging the two flags would be a good idea. Paolo
diff --git a/migration.c b/migration.c index c56d29c..7f8928a 100644 --- a/migration.c +++ b/migration.c @@ -312,6 +312,9 @@ void migrate_fd_put_notify(void *opaque) qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); qemu_file_put_notify(s->file); + if (qemu_file_has_error(s->file)) { + migrate_fd_error(s); + } } ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size) @@ -328,9 +331,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) { - s->state = MIG_STATE_ERROR; - notifier_list_notify(&migration_state_notifiers, NULL); } return ret;