From be733d6d484cd6a9e27a43a3f426688124fd0652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sun, 1 Dec 2013 22:23:40 +0100 Subject: spice-char: implement chardev port event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wire up chardev fe_event to Spice port. Signed-off-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- spice-qemu-char.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spice-qemu-char.c') diff --git a/spice-qemu-char.c b/spice-qemu-char.c index e074d9e4e8..16439c5860 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -222,6 +222,15 @@ static void spice_chr_set_fe_open(struct CharDriverState *chr, int fe_open) } } +static void spice_chr_fe_event(struct CharDriverState *chr, int event) +{ +#if SPICE_SERVER_VERSION >= 0x000c02 + SpiceCharDriver *s = 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 = spice_chr_close; chr->chr_set_fe_open = spice_chr_set_fe_open; chr->explicit_be_open = true; + chr->chr_fe_event = spice_chr_fe_event; QLIST_INSERT_HEAD(&spice_chars, s, next); -- cgit v1.2.3