Skip to content

Commit

Permalink
qxl+vnc: register a vm state change handler for dummy spice_server
Browse files Browse the repository at this point in the history
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 938b8a3)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
uril authored and mdroth committed Jan 16, 2013
1 parent 7ca2496 commit c4cd5b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/spice-core.c
Expand Up @@ -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);
Expand Down

0 comments on commit c4cd5b0

Please sign in to comment.