From fba810f1f67b411c209aa0e3d90724127cbd9c0f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 15 Jun 2011 13:11:33 +0200 Subject: spice: catch spice server initialization failures. 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 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/spice-core.c b/ui/spice-core.c index dd9905be36..e142452bb6 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; -- cgit v1.2.3