From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsUWe-0006Eb-VU for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:31:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsUWU-0002B3-T6 for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:31:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsUWU-0002Ak-Kz for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:31:34 -0500 From: Gerd Hoffmann Date: Mon, 16 Dec 2013 10:31:08 +0100 Message-Id: <1387186277-9573-8-git-send-email-kraxel@redhat.com> In-Reply-To: <1387186277-9573-1-git-send-email-kraxel@redhat.com> References: <1387186277-9573-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 07/16] spice-char: implement chardev port event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann From: Marc-Andr=C3=A9 Lureau Wire up chardev fe_event to Spice port. Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Gerd Hoffmann --- spice-qemu-char.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spice-qemu-char.c b/spice-qemu-char.c index e074d9e..16439c5 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -222,6 +222,15 @@ static void spice_chr_set_fe_open(struct CharDriverS= tate *chr, int fe_open) } } =20 +static void spice_chr_fe_event(struct CharDriverState *chr, int event) +{ +#if SPICE_SERVER_VERSION >=3D 0x000c02 + SpiceCharDriver *s =3D chr->opaque; + + spice_server_port_event(&s->sin, event); +#endif +} + static void print_allowed_subtypes(void) { const char** psubtype; @@ -255,6 +264,7 @@ static CharDriverState *chr_open(const char *subtype) chr->chr_close =3D spice_chr_close; chr->chr_set_fe_open =3D spice_chr_set_fe_open; chr->explicit_be_open =3D true; + chr->chr_fe_event =3D spice_chr_fe_event; =20 QLIST_INSERT_HEAD(&spice_chars, s, next); =20 --=20 1.8.3.1