diff options
Diffstat (limited to 'migration/tls.c')
-rw-r--r-- | migration/tls.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/migration/tls.c b/migration/tls.c index 49ca9a8930..203c11d025 100644 --- a/migration/tls.c +++ b/migration/tls.c @@ -61,15 +61,15 @@ migration_tls_get_creds(MigrationState *s, } -static void migration_tls_incoming_handshake(Object *src, - Error *err, +static void migration_tls_incoming_handshake(QIOTask *task, gpointer opaque) { - QIOChannel *ioc = QIO_CHANNEL(src); + QIOChannel *ioc = QIO_CHANNEL(qio_task_get_source(task)); + Error *err = NULL; - if (err) { + if (qio_task_propagate_error(task, &err)) { trace_migration_tls_incoming_handshake_error(error_get_pretty(err)); - error_report("%s", error_get_pretty(err)); + error_report_err(err); } else { trace_migration_tls_incoming_handshake_complete(); migration_channel_process_incoming(migrate_get_current(), ioc); @@ -107,17 +107,18 @@ void migration_tls_channel_process_incoming(MigrationState *s, } -static void migration_tls_outgoing_handshake(Object *src, - Error *err, +static void migration_tls_outgoing_handshake(QIOTask *task, gpointer opaque) { MigrationState *s = opaque; - QIOChannel *ioc = QIO_CHANNEL(src); + QIOChannel *ioc = QIO_CHANNEL(qio_task_get_source(task)); + Error *err = NULL; - if (err) { + if (qio_task_propagate_error(task, &err)) { trace_migration_tls_outgoing_handshake_error(error_get_pretty(err)); s->to_dst_file = NULL; migrate_fd_error(s, err); + error_free(err); } else { trace_migration_tls_outgoing_handshake_complete(); migration_channel_connect(s, ioc, NULL); |