Commit fd4144d4 authored by Juan Quintela's avatar Juan Quintela
Browse files

migration: to_dst_file at that point is NULL



We have just arrived as:

migration.c: qemu_migrate()
  ....
  s = migrate_init() <- puts it to NULL
  ....
  {tcp,unix}_start_outgoing_migration ->
     socket_outgoing_migration
        migration_channel_connect()
	   sets to_dst_file

if tls is enabled, we do another round through
migrate_channel_tls_connect(), but we only set it up if there is no
error.  So we don't need the assignation.  I am removing it to remove
in the follwing patches the knowledge about MigrationState in that two
files.

Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
Reviewed-by: default avatarLaurent Vivier <lvivier@redhat.com>
Reviewed-by: default avatarDaniel P. Berrange <berrange@redhat.com>
Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
parent 062d81f0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ static void socket_outgoing_migration(QIOTask *task,

    if (qio_task_propagate_error(task, &err)) {
        trace_migration_socket_outgoing_error(error_get_pretty(err));
        data->s->to_dst_file = NULL;
        migrate_fd_error(data->s, err);
        error_free(err);
    } else {
+0 −1
Original line number Diff line number Diff line
@@ -116,7 +116,6 @@ static void migration_tls_outgoing_handshake(QIOTask *task,

    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 {