[Spice-devel] [PATCH spice-gtk 9/9] session: reset connection_id on switch-host

Marc-André Lureau marcandre.lureau at redhat.com
Mon Feb 16 09:02:30 PST 2015


The server expects no connection_id during link time, in order to
realize a full reconnection.

The alternative would be to assume that the destination server has the
exact same channels and attempt to recreate and to reconnect them one by
one. However, if the destination is slightly different (say,
configuration or order of channels differs), this will likely fail. It's
best to start with a new session without prior knowledge.
---
 gtk/spice-session.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 6c6c7a1..e785ceb 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1581,6 +1581,7 @@ void spice_session_switching_disconnect(SpiceSession *self)
     g_warn_if_fail(!ring_is_empty(&s->channels)); /* ring_get_length() == 1 */
 
     cache_clear_all(self);
+    s->connection_id = 0;
 }
 
 #define SWAP_STR(x, y) G_STMT_START { \
-- 
2.1.0



More information about the Spice-devel mailing list