diff options
author | Anthony Liguori <aliguori@amazon.com> | 2013-12-16 09:44:13 -0800 |
---|---|---|
committer | Anthony Liguori <aliguori@amazon.com> | 2013-12-16 09:44:13 -0800 |
commit | b91f93243bbe36dc436a64a662a9bbfb2362534a (patch) | |
tree | 6a635a56f1b180aadaeba9d4c20fc9180dba5170 /ui/spice-core.c | |
parent | 80d6f5eae79b009bf3e02e59e9e225db42ddf887 (diff) | |
parent | 75c70e37bc4a6bdc394b4d1b163fe730abb82c72 (diff) | |
download | hqemu-b91f93243bbe36dc436a64a662a9bbfb2362534a.zip hqemu-b91f93243bbe36dc436a64a662a9bbfb2362534a.tar.gz |
Merge remote-tracking branch 'spice/tags/pull-spice-1' into staging
Collection of little cleanups anf bugfixes.
nbd patches in preparation of spice-nbd.
# gpg: Signature made Mon 16 Dec 2013 01:27:45 AM PST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found
# By Marc-André Lureau (12) and Gerd Hoffmann (4)
# Via Gerd Hoffmann
* spice/tags/pull-spice-1:
spice: stop server for qxl hard reset
spice: move spice_server_vm_{start,stop} calls into qemu_spice_display_*()
spice: move qemu_spice_display_*() from spice-graphics to spice-core
nbd: avoid uninitialized warnings
nbd: finish any pending coroutine
nbd: make nbd_client_session_close() idempotent
nbd: pass export name as init argument
nbd: don't change socket block during negotiate
Split nbd block client code
spice-char: implement chardev port event
char: add qemu_chr_fe_event()
include: add missing config-host.h include
qmp_change_blockdev() remove unused has_format
spice-char: remove unused field
vscclient: do not add a socket watch if there is not data to send
spice: flip streaming video mode to off by default
Diffstat (limited to 'ui/spice-core.c')
-rw-r--r-- | ui/spice-core.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c index e4d533d..4cce3b3 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -47,6 +47,7 @@ static const char *auth = "spice"; static char *auth_passwd; static time_t auth_expires = TIME_MAX; static int spice_migration_completed; +static int spice_display_is_running; int using_spice = 0; static QemuThread me; @@ -622,9 +623,7 @@ static void vm_change_state_handler(void *opaque, int running, { if (running) { qemu_spice_display_start(); - spice_server_vm_start(spice_server); } else { - spice_server_vm_stop(spice_server); qemu_spice_display_stop(); } } @@ -776,6 +775,8 @@ void qemu_spice_init(void) if (str) { int streaming_video = parse_stream_video(str); spice_server_set_streaming_video(spice_server, streaming_video); + } else { + spice_server_set_streaming_video(spice_server, SPICE_STREAM_VIDEO_OFF); } spice_server_set_agent_mouse @@ -902,6 +903,23 @@ int qemu_spice_display_add_client(int csock, int skipauth, int tls) } } +void qemu_spice_display_start(void) +{ + spice_display_is_running = true; + spice_server_vm_start(spice_server); +} + +void qemu_spice_display_stop(void) +{ + spice_server_vm_stop(spice_server); + spice_display_is_running = false; +} + +int qemu_spice_display_is_running(SimpleSpiceDisplay *ssd) +{ + return spice_display_is_running; +} + static void spice_register_config(void) { qemu_add_opts(&qemu_spice_opts); |