*/
#include "qemu/osdep.h"
-#include "qapi/error.h"
-#include "qemu-common.h"
-#include "migration/migration.h"
+#include "channel.h"
+#include "exec.h"
+#include "migration.h"
#include "io/channel-command.h"
#include "trace.h"
trace_migration_exec_outgoing(command);
ioc = QIO_CHANNEL(qio_channel_command_new_spawn(argv,
- O_WRONLY,
+ O_RDWR,
errp));
if (!ioc) {
return;
}
- migration_channel_connect(s, ioc, NULL);
+ qio_channel_set_name(ioc, "migration-exec-outgoing");
+ migration_channel_connect(s, ioc, NULL, NULL);
object_unref(OBJECT(ioc));
}
GIOCondition condition,
gpointer opaque)
{
- migration_channel_process_incoming(migrate_get_current(), ioc);
+ migration_channel_process_incoming(ioc);
object_unref(OBJECT(ioc));
- return FALSE; /* unregister */
+ return G_SOURCE_REMOVE;
}
void exec_start_incoming_migration(const char *command, Error **errp)
trace_migration_exec_incoming(command);
ioc = QIO_CHANNEL(qio_channel_command_new_spawn(argv,
- O_RDONLY,
+ O_RDWR,
errp));
if (!ioc) {
return;
}
- qio_channel_add_watch(ioc,
- G_IO_IN,
- exec_accept_incoming_migration,
- NULL,
- NULL);
+ qio_channel_set_name(ioc, "migration-exec-incoming");
+ qio_channel_add_watch_full(ioc, G_IO_IN,
+ exec_accept_incoming_migration,
+ NULL, NULL,
+ g_main_context_get_thread_default());
}