yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 8b96a7cb5bab06ecc5e85f292fbe7598b0e24c8c Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Fri, 5 Sep 2014 12:30:36 +0200
Subject: [PATCH 02/12] spice: move spice_server_vm_{start, stop} calls into qemu_spice_display_*()

Message-id: <1409920238-9070-3-git-send-email-kraxel@redhat.com>
Patchwork-id: 60874
O-Subject: [RHEL-7.1 qemu-kvm PATCH 2/4] spice: move spice_server_vm_{start, stop} calls into qemu_spice_display_*()
Bugzilla: 1054077
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>

So calling spice server to start/stop the worker goes
hand in hand with the status variable update.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit b50f3e42b9438e033074222671c0502ecfeba82c)
---
 ui/spice-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 ui/spice-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/spice-core.c b/ui/spice-core.c
index 6a7c86f..99a76d2 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -621,9 +621,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();
     }
 }
@@ -877,10 +875,12 @@ 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;
 }
 
-- 
1.7.1