diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-08-20 13:49:00 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-08-27 09:04:52 +0300 |
commit | 2a1369c91966450424910d51f39e4b57a7c8973f (patch) | |
tree | b49a1f83f86affaa92009a4ff643844f65ff7b6d /server/red_dispatcher.c | |
parent | c302e12c78acc24461e19691119557945e0c2dc8 (diff) | |
download | spice-2a1369c91966450424910d51f39e4b57a7c8973f.tar.gz spice-2a1369c91966450424910d51f39e4b57a7c8973f.tar.xz spice-2a1369c91966450424910d51f39e4b57a7c8973f.zip |
spice_server_vm_start/stop: notify red_dispatcher on vm start/stop
Till now, red_worker was notfied about vm status changes via QXLWorker->start/stop
(or spice_qxl_start/stop).
Newer qemu, that supports calling spice_server_vm_start/stop, will call only
these routines, and won't call QXLWorker->start/stop.
Diffstat (limited to 'server/red_dispatcher.c')
-rw-r--r-- | server/red_dispatcher.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c index 8d9c073a..69d4f0a1 100644 --- a/server/red_dispatcher.c +++ b/server/red_dispatcher.c @@ -762,6 +762,28 @@ void red_dispatcher_set_mouse_mode(uint32_t mode) } } +void red_dispatcher_on_vm_stop(void) +{ + RedDispatcher *now = dispatchers; + + spice_debug(NULL); + while (now) { + red_dispatcher_stop(now); + now = now->next; + } +} + +void red_dispatcher_on_vm_start(void) +{ + RedDispatcher *now = dispatchers; + + spice_debug(NULL); + while (now) { + red_dispatcher_start(now); + now = now->next; + } +} + int red_dispatcher_count(void) { RedDispatcher *now = dispatchers; |