[Spice-devel] [PATCH spice-server 09/10] red_channel: notify and shutdown a channel client when its handle_migrate_data fails
Yonit Halperin
yhalperi at redhat.com
Wed May 8 07:06:24 PDT 2013
---
server/red_channel.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/server/red_channel.c b/server/red_channel.c
index 7fde50d..b738a80 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -1275,14 +1275,17 @@ static void red_channel_handle_migrate_data(RedChannelClient *rcc, uint32_t size
return;
}
if (!red_channel_client_waits_for_migrate_data(rcc)) {
- spice_error("unexcpected");
+ spice_channel_client_error(rcc, "unexcpected");
return;
}
if (rcc->channel->channel_cbs.handle_migrate_data_get_serial) {
red_channel_client_set_message_serial(rcc,
rcc->channel->channel_cbs.handle_migrate_data_get_serial(rcc, size, message));
}
- rcc->channel->channel_cbs.handle_migrate_data(rcc, size, message);
+ if (!rcc->channel->channel_cbs.handle_migrate_data(rcc, size, message)) {
+ spice_channel_client_error(rcc, "handle_migrate_data failed");
+ return;
+ }
red_channel_client_seamless_migration_done(rcc);
}
--
1.8.1.4
More information about the Spice-devel
mailing list