@@ -1138,7 +1138,7 @@ static bool multifd_new_send_channel_create(MultiFDSendParams *p, Error **errp)
return file_send_channel_create(p, errp);
}
- socket_send_channel_create(multifd_new_send_channel_async, p);
+ socket_send_channel_create(multifd_new_send_channel_async, p, NULL);
return true;
}
@@ -1715,7 +1715,7 @@ int postcopy_preempt_establish_channel(MigrationState *s)
void postcopy_preempt_setup(MigrationState *s)
{
/* Kick an async task to connect */
- socket_send_channel_create(postcopy_preempt_send_channel_new, s);
+ socket_send_channel_create(postcopy_preempt_send_channel_new, s, NULL);
}
static void postcopy_pause_ram_fast_load(MigrationIncomingState *mis)
@@ -35,11 +35,13 @@ struct SocketOutgoingArgs {
SocketAddress *saddr;
} outgoing_args;
-void socket_send_channel_create(QIOTaskFunc f, void *data)
+void socket_send_channel_create(QIOTaskFunc f,
+ void *data, GDestroyNotify data_destroy)
{
QIOChannelSocket *sioc = qio_channel_socket_new();
+
qio_channel_socket_connect_async(sioc, outgoing_args.saddr,
- f, data, NULL, NULL);
+ f, data, data_destroy, NULL);
}
QIOChannel *socket_send_channel_create_sync(Error **errp)
@@ -21,7 +21,8 @@
#include "io/task.h"
#include "qemu/sockets.h"
-void socket_send_channel_create(QIOTaskFunc f, void *data);
+void socket_send_channel_create(QIOTaskFunc f,
+ void *data, GDestroyNotify data_destroy);
QIOChannel *socket_send_channel_create_sync(Error **errp);
void socket_start_incoming_migration(SocketAddress *saddr, Error **errp);