From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsUWf-0006FS-Bc for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:31:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsUWW-0002Bv-3k for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:31:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsUWV-0002BS-M9 for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:31:36 -0500 From: Gerd Hoffmann Date: Mon, 16 Dec 2013 10:31:16 +0100 Message-Id: <1387186277-9573-16-git-send-email-kraxel@redhat.com> In-Reply-To: <1387186277-9573-1-git-send-email-kraxel@redhat.com> References: <1387186277-9573-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 15/16] spice: move spice_server_vm_{start, stop} calls into qemu_spice_display_*() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori So calling spice server to start/stop the worker goes hand in hand with the status variable update. Signed-off-by: Gerd Hoffmann --- ui/spice-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 0c48156..4cce3b3 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -623,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(); } } @@ -908,10 +906,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.8.3.1