qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/4] spice-qemu-char: register interface on post loa


From: Alon Levy
Subject: [Qemu-devel] [PATCH 4/4] spice-qemu-char: register interface on post load
Date: Wed, 20 Mar 2013 11:55:14 +0200

The target has not seen the guest_connected event via
spice_chr_guest_open or spice_chr_write, and so spice server wrongly
assumes there is no agent active, while the client continues to send
motion events only by the agent channel, which the server ignores. The
net effect is that the mouse is static in the guest.

By registering the interface on post load spice server will pass on the
agent messages fixing the mouse behavior after migration.

RHBZ #725965

Signed-off-by: Alon Levy <address@hidden>
---
 spice-qemu-char.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/spice-qemu-char.c b/spice-qemu-char.c
index 8a9236d..c6aed58 100644
--- a/spice-qemu-char.c
+++ b/spice-qemu-char.c
@@ -205,6 +205,14 @@ static void print_allowed_subtypes(void)
     fprintf(stderr, "\n");
 }
 
+static void spice_chr_post_load(struct CharDriverState *chr,
+                                     int connected)
+{
+    if (connected) {
+        spice_chr_guest_open(chr);
+    }
+}
+
 static CharDriverState *chr_open(const char *subtype)
 {
     CharDriverState *chr;
@@ -220,6 +228,7 @@ static CharDriverState *chr_open(const char *subtype)
     chr->chr_close = spice_chr_close;
     chr->chr_guest_open = spice_chr_guest_open;
     chr->chr_guest_close = spice_chr_guest_close;
+    chr->chr_post_load = spice_chr_post_load;
 
     QLIST_INSERT_HEAD(&spice_chars, s, next);
 
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]