summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2012-12-12 18:30:47 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2013-01-15 22:36:22 -0600
commitc4cd5b0f6de4173db97553a95ec9d82a8492ca7c (patch)
treeb4d6df8a2fe9041ff1d52724c84352f6b742feba /ui
parent7ca2496588914a51e2f3f7983bb25f5dc8ba5630 (diff)
downloadqemu-c4cd5b0f6de4173db97553a95ec9d82a8492ca7c.tar.gz
qxl+vnc: register a vm state change handler for dummy spice_server
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> (cherry picked from commit 938b8a36b65e44c44ca29245437f8d7ac0f826e8) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/spice-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 261c6f2c11..59ce5f6370 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -732,6 +732,8 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)
*/
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);