[Spice-devel] [PATCH spice-gtk 1/6] channel: try TLS only once

Marc-André Lureau marcandre.lureau at gmail.com
Thu Apr 11 06:09:55 PDT 2013


A broken server may reply to switch to TLS again and again. spice-gtk
should only try once.
---
 gtk/spice-channel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 7061229..333dcf3 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2312,7 +2312,7 @@ cleanup:
 
     SPICE_CHANNEL_GET_CLASS(channel)->channel_disconnect(channel);
 
-    if (switch_tls) {
+    if (switch_tls && !c->tls) {
         c->tls = true;
         spice_channel_connect(channel);
         g_object_unref(channel);
-- 
1.8.2.1.342.gfa7285d



More information about the Spice-devel mailing list