diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2011-09-18 13:09:52 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2011-11-02 11:21:41 +0200 |
commit | e62521ca51dae8c6d943c345e9ff2124727eacaa (patch) | |
tree | f19196499e19af1c8665c676e6dd0b632640672e /server/main_channel.h | |
parent | fdb464bb052cab4a822a9bdc0835e33e0b90857f (diff) | |
download | spice-e62521ca51dae8c6d943c345e9ff2124727eacaa.tar.gz spice-e62521ca51dae8c6d943c345e9ff2124727eacaa.tar.xz spice-e62521ca51dae8c6d943c345e9ff2124727eacaa.zip |
server: handle spice_server_migrate_end
If the migration has completed successfully:
(1) send MSG_MAIN_MIGRATE_END to the clients that are connected to the target
(2) send MSG_MAIN_SWITCH_HOST to all the other clients
If the migration failed, send MSG_MAIN_MIGRATE_CANCEL to clients that are
connected to the target.
(cherry picked from commit 4b82580fc36228af13db4ac3c403753d6b5c40b5 branch 0.8;
Was modified to support multiple clients, and the separation of main_channel from reds)
Conflicts:
server/reds.c
Diffstat (limited to 'server/main_channel.h')
-rw-r--r-- | server/main_channel.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/main_channel.h b/server/main_channel.h index f3702e76..d97857db 100644 --- a/server/main_channel.h +++ b/server/main_channel.h @@ -83,8 +83,6 @@ void main_channel_push_init(MainChannelClient *mcc, int connection_id, int displ int ram_hint); void main_channel_push_notify(MainChannel *main_chan, uint8_t *mess, const int mess_len); void main_channel_push_migrate(MainChannel *main_chan); -void main_channel_push_migrate_switch(MainChannel *main_chan); -void main_channel_push_migrate_cancel(MainChannel *main_chan); void main_channel_push_multi_media_time(MainChannel *main_chan, int time); int main_channel_getsockname(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen); int main_channel_getpeername(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen); @@ -95,10 +93,14 @@ uint64_t main_channel_client_get_bitrate_per_sec(MainChannelClient *mcc); int main_channel_is_connected(MainChannel *main_chan); RedChannelClient* main_channel_client_get_base(MainChannelClient* mcc); +/* switch host migration */ +void main_channel_migrate_switch(MainChannel *main_chan, RedsMigSpice *mig_target); + /* semi seamless migration */ /* returns the number of clients that we are waiting for their connection */ int main_channel_migrate_connect(MainChannel *main_channel, RedsMigSpice *mig_target); void main_channel_migrate_cancel_wait(MainChannel *main_chan); -void main_channel_migrate_complete(MainChannel *main_chan, int success); +/* returns the number of clients for which SPICE_MSG_MAIN_MIGRATE_END was sent*/ +int main_channel_migrate_complete(MainChannel *main_chan, int success); #endif |