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 <kraxel@redhat.com>
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 @@
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;