diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-08-14 14:47:49 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-08-27 09:13:00 +0300 |
commit | 275e4312df6c0f13ca2253ceac3976cee7d700e9 (patch) | |
tree | 7b49c3f4b54d7382c0a79ecc5cf71cd282362e08 /server/main_channel.c | |
parent | eb4c95b08b6848ee604497bb66392636341ad1fe (diff) | |
download | spice-275e4312df6c0f13ca2253ceac3976cee7d700e9.tar.gz spice-275e4312df6c0f13ca2253ceac3976cee7d700e9.tar.xz spice-275e4312df6c0f13ca2253ceac3976cee7d700e9.zip |
seamless migration: migration completion on the destination side
Tracking the channels that wait for migration data. If there
is a new migration process pending, when all the channels have
restored their state, we begin the new migration.
Diffstat (limited to 'server/main_channel.c')
-rw-r--r-- | server/main_channel.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/server/main_channel.c b/server/main_channel.c index 63989657..e06bb05e 100644 --- a/server/main_channel.c +++ b/server/main_channel.c @@ -837,10 +837,14 @@ void main_channel_client_handle_migrate_end(MainChannelClient *mcc) "client does not support semi-seamless migration"); return; } - red_client_migrate_complete(mcc->base.client); - if (mcc->mig_wait_prev_complete) { + red_client_semi_seamless_migrate_complete(mcc->base.client); +} +void main_channel_migrate_dst_complete(MainChannelClient *mcc) +{ + if (mcc->mig_wait_prev_complete) { if (mcc->mig_wait_prev_try_seamless) { + spice_assert(mcc->base.channel->clients_num == 1); red_channel_client_pipe_add_type(&mcc->base, SPICE_MSG_MAIN_MIGRATE_BEGIN_SEAMLESS); } else { red_channel_client_pipe_add_type(&mcc->base, SPICE_MSG_MAIN_MIGRATE_BEGIN); @@ -849,6 +853,7 @@ void main_channel_client_handle_migrate_end(MainChannelClient *mcc) mcc->mig_wait_prev_complete = FALSE; } } + static int main_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint16_t type, void *message) { @@ -1248,7 +1253,7 @@ void main_channel_migrate_cancel_wait(MainChannel *main_chan) main_chan->num_clients_mig_wait = 0; } -int main_channel_migrate_complete(MainChannel *main_chan, int success) +int main_channel_migrate_src_complete(MainChannel *main_chan, int success) { RingItem *client_link; int semi_seamless_count = 0; |