diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-08-25 23:20:22 +0300 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-08-28 18:36:28 +0200 |
commit | b676434c98d5236745b5797c3e56cc45bd7b1348 (patch) | |
tree | c20c0ec71f2ef69b9cdf2dab0b2ff5b9ab59b8e1 /gtk/spice-channel.c | |
parent | 202cdd9d8a8e0a08326c44c0ad75997f026bda84 (diff) |
seamless migration: don't reset messages data when swapping channels
When swapping the src and dest channels's, we need to keep
the xmit_queue and msg serials. Their state is expected to stay the same
after migration.
Diffstat (limited to 'gtk/spice-channel.c')
-rw-r--r-- | gtk/spice-channel.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c index 5f37cbc..a557ce8 100644 --- a/gtk/spice-channel.c +++ b/gtk/spice-channel.c @@ -2591,7 +2591,7 @@ enum spice_channel_state spice_channel_get_state(SpiceChannel *channel) } G_GNUC_INTERNAL -void spice_channel_swap(SpiceChannel *channel, SpiceChannel *swap) +void spice_channel_swap(SpiceChannel *channel, SpiceChannel *swap, gboolean swap_msgs) { SpiceChannelPrivate *c = SPICE_CHANNEL_GET_PRIVATE(channel); SpiceChannelPrivate *s = SPICE_CHANNEL_GET_PRIVATE(swap); @@ -2614,11 +2614,13 @@ void spice_channel_swap(SpiceChannel *channel, SpiceChannel *swap) SWAP(ctx); SWAP(ssl); SWAP(sslverify); - SWAP(in_serial); - SWAP(out_serial); SWAP(use_mini_header); - SWAP(xmit_queue); - SWAP(xmit_queue_blocked); + if (swap_msgs) { + SWAP(xmit_queue); + SWAP(xmit_queue_blocked); + SWAP(in_serial); + SWAP(out_serial); + } SWAP(caps); SWAP(common_caps); SWAP(remote_caps); |