From patchwork Mon Dec 17 13:04:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 206864 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 340952C0089 for ; Tue, 18 Dec 2012 00:49:03 +1100 (EST) Received: from localhost ([::1]:45644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkaO3-0006GQ-65 for incoming@patchwork.ozlabs.org; Mon, 17 Dec 2012 08:05:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkaND-0004v7-Dw for qemu-devel@nongnu.org; Mon, 17 Dec 2012 08:04:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkaN7-0004Dm-VC for qemu-devel@nongnu.org; Mon, 17 Dec 2012 08:04:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkaN7-0004DN-OD; Mon, 17 Dec 2012 08:04:41 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBHD4flT006574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 Dec 2012 08:04:41 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBHD4edL010963; Mon, 17 Dec 2012 08:04:40 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 80B6540A41; Mon, 17 Dec 2012 14:04:39 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 17 Dec 2012 14:04:33 +0100 Message-Id: <1355749479-25470-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1355749479-25470-1-git-send-email-kraxel@redhat.com> References: <1355749479-25470-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Uri Lublin , qemu-stable@nongnu.org, Gerd Hoffmann Subject: [Qemu-devel] [PATCH 2/8] qxl+vnc: register a vm state change handler for dummy spice_server X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Uri Lublin 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 Signed-off-by: Gerd Hoffmann --- ui/spice-core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 261c6f2..59ce5f6 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -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);