2013-02-02 20:47:37 +00:00
|
|
|
From 2c410bf8bafee23b4a4d1041b833645c6320851e Mon Sep 17 00:00:00 2001
|
2013-01-18 14:50:38 +00:00
|
|
|
From: Uri Lublin <uril@redhat.com>
|
|
|
|
Date: Wed, 12 Dec 2012 16:30:47 +0000
|
2013-02-02 20:47:37 +00:00
|
|
|
Subject: [PATCH] qxl+vnc: register a vm state change handler for dummy
|
|
|
|
spice_server
|
2013-01-18 14:50:38 +00:00
|
|
|
|
|
|
|
When qxl + vnc are used, a dummy spice_server is initialized.
|
|
|
|
The spice_server has to be told when the VM runstate changes,
|
|
|
|
which is what this patch does.
|
|
|
|
|
|
|
|
Without it, from qxl_send_events(), the following error message is shown:
|
|
|
|
qxl_send_events: spice-server bug: guest stopped, ignoring
|
|
|
|
|
|
|
|
Cc: qemu-stable@nongnu.org
|
|
|
|
Signed-off-by: Uri Lublin <uril@redhat.com>
|
|
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
---
|
2013-02-02 20:47:37 +00:00
|
|
|
ui/spice-core.c | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
2013-01-18 14:50:38 +00:00
|
|
|
diff --git a/ui/spice-core.c b/ui/spice-core.c
|
2013-02-02 20:47:37 +00:00
|
|
|
index ba0d0bd..cb4b8b9 100644
|
2013-01-18 14:50:38 +00:00
|
|
|
--- a/ui/spice-core.c
|
|
|
|
+++ b/ui/spice-core.c
|
2013-02-02 20:47:37 +00:00
|
|
|
@@ -775,6 +775,8 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)
|
2013-01-18 14:50:38 +00:00
|
|
|
*/
|
|
|
|
spice_server = spice_server_new();
|
|
|
|
spice_server_init(spice_server, &core_interface);
|
|
|
|
+ qemu_add_vm_change_state_handler(vm_change_state_handler,
|
|
|
|
+ &spice_server);
|
|
|
|
}
|
|
|
|
|
|
|
|
return spice_server_add_interface(spice_server, sin);
|