From 0a5e9cbbcf9a3ebc6c7e3ccd3e7026998d2488d9 Mon Sep 17 00:00:00 2001 From: Yonit Halperin Date: Sun, 18 Sep 2011 22:50:50 +0300 Subject: client: main channel migration: do partial cleanup when switching hosts Implement on_disconnect_mig_src and on_connect_mig_target in order to avoid unnecessary cleanups done in on_(disconnet|connect). In addition, do not request guest display settings changes after migration. (cherry picked from commit f91d202eb3bf631cf5e70277d1aabffec7da9393 branch 0.8) --- client/red_client.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'client/red_client.cpp') diff --git a/client/red_client.cpp b/client/red_client.cpp index 84440c10..4fc442fb 100644 --- a/client/red_client.cpp +++ b/client/red_client.cpp @@ -498,6 +498,15 @@ void RedClient::on_disconnect() (*sync_event)->wait(); } +void RedClient::on_disconnect_mig_src() +{ + _application.deactivate_interval_timer(*_agent_timer); + delete[] _agent_msg_data; + _agent_msg_data = NULL; + _agent_msg_pos = 0; + _agent_tokens = 0; +} + void RedClient::delete_channels() { Lock lock(_channels_lock); -- cgit