From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:60530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gx5eQ-0006yA-41 for qemu-devel@nongnu.org; Fri, 22 Feb 2019 02:53:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gx5eO-0001bf-Ce for qemu-devel@nongnu.org; Fri, 22 Feb 2019 02:53:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59596) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gx5eN-0001Rb-3c for qemu-devel@nongnu.org; Fri, 22 Feb 2019 02:53:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DFDEDE6A68 for ; Fri, 22 Feb 2019 07:53:32 +0000 (UTC) From: Gerd Hoffmann Date: Fri, 22 Feb 2019 08:53:22 +0100 Message-Id: <20190222075326.9850-12-kraxel@redhat.com> In-Reply-To: <20190222075326.9850-1-kraxel@redhat.com> References: <20190222075326.9850-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 11/15] char: register spice ports after spice started List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Eric Blake , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster , Gerd Hoffmann From: Marc-Andr=C3=A9 Lureau 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=C3=A9 Lureau Tested-by: Victor Toso Message-id: 20190221110703.5775-8-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- chardev/spice.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chardev/spice.c b/chardev/spice.c index 2202d50eee1e..22c30ae833dd 100644 --- a/chardev/spice.c +++ b/chardev/spice.c @@ -316,6 +316,11 @@ void qemu_chr_open_spice_port(Chardev *chr, *be_opened =3D false; s =3D SPICE_CHARDEV(chr); s->sin.portname =3D g_strdup(name); + + if (using_spice) { + /* spice server already created */ + vmc_register_interface(s); + } } =20 void qemu_spice_register_ports(void) --=20 2.9.3