From edc5cb1a52b2847201acf78b0fba67ab3c2464d5 Mon Sep 17 00:00:00 2001 From: Yonit Halperin Date: Mon, 17 Oct 2011 10:03:18 +0200 Subject: spice: turn client_migrate_info to async RHBZ 737921 Spice client is required to connect to the migration target before/as migration starts. Since after migration starts, the target qemu is blocked and cannot accept new spice client we trigger the connection to the target upon client_migrate_info command. client_migrate_info completion cb will be called after spice client has been connected to the target (or a timeout). See following patches and spice patches. Signed-off-by: Yonit Halperin Signed-off-by: Gerd Hoffmann --- ui/spice-core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ui/spice-core.c') diff --git a/ui/spice-core.c b/ui/spice-core.c index b33366e5d7..62ffb9b28c 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -457,10 +457,14 @@ static void migration_state_notifier(Notifier *notifier, void *data) } int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, - const char *subject) + const char *subject, + MonitorCompletion *cb, void *opaque) { - return spice_server_migrate_info(spice_server, hostname, - port, tls_port, subject); + int ret; + ret = spice_server_migrate_info(spice_server, hostname, + port, tls_port, subject); + cb(opaque, NULL); + return ret; } static int add_channel(const char *name, const char *value, void *opaque) -- cgit v1.2.1