~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to migration/tls.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
}
62
62
 
63
63
 
64
 
static void migration_tls_incoming_handshake(Object *src,
65
 
                                             Error *err,
 
64
static void migration_tls_incoming_handshake(QIOTask *task,
66
65
                                             gpointer opaque)
67
66
{
68
 
    QIOChannel *ioc = QIO_CHANNEL(src);
 
67
    QIOChannel *ioc = QIO_CHANNEL(qio_task_get_source(task));
 
68
    Error *err = NULL;
69
69
 
70
 
    if (err) {
 
70
    if (qio_task_propagate_error(task, &err)) {
71
71
        trace_migration_tls_incoming_handshake_error(error_get_pretty(err));
72
 
        error_report("%s", error_get_pretty(err));
 
72
        error_report_err(err);
73
73
    } else {
74
74
        trace_migration_tls_incoming_handshake_complete();
75
75
        migration_channel_process_incoming(migrate_get_current(), ioc);
107
107
}
108
108
 
109
109
 
110
 
static void migration_tls_outgoing_handshake(Object *src,
111
 
                                             Error *err,
 
110
static void migration_tls_outgoing_handshake(QIOTask *task,
112
111
                                             gpointer opaque)
113
112
{
114
113
    MigrationState *s = opaque;
115
 
    QIOChannel *ioc = QIO_CHANNEL(src);
 
114
    QIOChannel *ioc = QIO_CHANNEL(qio_task_get_source(task));
 
115
    Error *err = NULL;
116
116
 
117
 
    if (err) {
 
117
    if (qio_task_propagate_error(task, &err)) {
118
118
        trace_migration_tls_outgoing_handshake_error(error_get_pretty(err));
119
119
        s->to_dst_file = NULL;
120
120
        migrate_fd_error(s, err);
 
121
        error_free(err);
121
122
    } else {
122
123
        trace_migration_tls_outgoing_handshake_complete();
123
124
        migration_channel_connect(s, ioc, NULL);
140
141
        return;
141
142
    }
142
143
 
143
 
    if (s->parameters.tls_hostname) {
 
144
    if (s->parameters.tls_hostname && *s->parameters.tls_hostname) {
144
145
        hostname = s->parameters.tls_hostname;
145
146
    }
146
147
    if (!hostname) {