]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
spice-char: implement chardev port event
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Sun, 1 Dec 2013 21:23:40 +0000 (22:23 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Dec 2013 09:12:20 +0000 (10:12 +0100)
Wire up chardev fe_event to Spice port.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
spice-qemu-char.c

index e074d9e4e80b4f126715506bd3c17cf2c9953758..16439c5860918da064a1b3c62f774ac82e494a53 100644 (file)
@@ -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);