]> git.proxmox.com Git - mirror_qemu.git/commitdiff
char: register spice ports after spice started
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 21 Feb 2019 11:06:59 +0000 (12:06 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 21 Feb 2019 13:09:17 +0000 (14:09 +0100)
Spice port registration is delayed until the server is started. But
ports created after are not being registered. If the server is already
started, do vmc_register_interface() to register it from
qemu_chr_open_spice_port().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Victor Toso <victortoso@redhat.com>
Message-id: 20190221110703.5775-8-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
chardev/spice.c

index 2202d50eee1eb6c59919d487dc5daf1266946157..22c30ae833dd99093465f65bdc9939b701ccbccf 100644 (file)
@@ -316,6 +316,11 @@ void qemu_chr_open_spice_port(Chardev *chr,
     *be_opened = false;
     s = SPICE_CHARDEV(chr);
     s->sin.portname = g_strdup(name);
+
+    if (using_spice) {
+        /* spice server already created */
+        vmc_register_interface(s);
+    }
 }
 
 void qemu_spice_register_ports(void)