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>
This commit is contained in:
Gerd Hoffmann 2011-06-15 13:11:33 +02:00
parent 638f4e4779
commit fba810f1f6
1 changed files with 4 additions and 1 deletions

View File

@ -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;