aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 8a607fe..2834296 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2963,6 +2963,7 @@ static MigThrError migration_detect_error(MigrationState *s)
{
int ret;
int state = s->state;
+ Error *local_error = NULL;
if (state == MIGRATION_STATUS_CANCELLING ||
state == MIGRATION_STATUS_CANCELLED) {
@@ -2971,13 +2972,18 @@ static MigThrError migration_detect_error(MigrationState *s)
}
/* Try to detect any file errors */
- ret = qemu_file_get_error(s->to_dst_file);
-
+ ret = qemu_file_get_error_obj(s->to_dst_file, &local_error);
if (!ret) {
/* Everything is fine */
+ assert(!local_error);
return MIG_THR_ERR_NONE;
}
+ if (local_error) {
+ migrate_set_error(s, local_error);
+ error_free(local_error);
+ }
+
if (state == MIGRATION_STATUS_POSTCOPY_ACTIVE && ret == -EIO) {
/*
* For postcopy, we allow the network to be down for a