char: register spice ports after spice started

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>
This commit is contained in:
Marc-André Lureau 2019-02-21 12:06:59 +01:00 committed by Gerd Hoffmann
parent 24fa7da3ca
commit 8afbff1652

View 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)