summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2013-05-07 14:54:40 -0400
committerYonit Halperin <yhalperi@redhat.com>2013-05-08 11:26:50 -0400
commitb82351f7119d3c9058ebafd1de130f3b078d0c74 (patch)
tree9f04e22747d666c7c859bcf594d38e8022a53048
parentdbb99a6517bb7a1d059d7962ddba5ae5524abee3 (diff)
downloadspice-b82351f7119d3c9058ebafd1de130f3b078d0c74.tar.gz
spice-b82351f7119d3c9058ebafd1de130f3b078d0c74.tar.xz
spice-b82351f7119d3c9058ebafd1de130f3b078d0c74.zip
red_channel: notify and shutdown a channel client when its handle_migrate_data fails
-rw-r--r--server/red_channel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index 9d71543b..119e5e5b 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, "unexpected");
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);
}