From patchwork Mon Jul 4 15:14:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 103123 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3C5B6B6F70 for ; Tue, 5 Jul 2011 01:29:47 +1000 (EST) Received: from localhost ([::1]:61000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdl5j-00039g-2x for incoming@patchwork.ozlabs.org; Mon, 04 Jul 2011 11:29:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdkqs-0008HU-Jb for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:14:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdkqq-0006ih-82 for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:14:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdkqp-0006i1-7W for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:14:19 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p64FEHVK013772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Jul 2011 11:14:18 -0400 Received: from rincewind.home.kraxel.org (vpn1-7-218.ams2.redhat.com [10.36.7.218]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p64FEGr4026480; Mon, 4 Jul 2011 11:14:17 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 1DF4240C14; Mon, 4 Jul 2011 17:14:15 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 4 Jul 2011 17:14:08 +0200 Message-Id: <1309792455-26825-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1309792455-26825-1-git-send-email-kraxel@redhat.com> References: <1309792455-26825-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 2/9] spice: catch spice server initialization failures. 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 When the spice server initialization fails report this and exit instead of ignoring the error. Signed-off-by: Gerd Hoffmann --- ui/spice-core.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index dd9905b..e142452 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -602,7 +602,10 @@ void qemu_spice_init(void) qemu_opt_foreach(opts, add_channel, NULL, 0); - spice_server_init(spice_server, &core_interface); + if (0 != spice_server_init(spice_server, &core_interface)) { + fprintf(stderr, "failed to initialize spice server"); + exit(1); + }; using_spice = 1; migration_state.notify = migration_state_notifier;