Blame SOURCES/vinagre-3.14.3-connection-failure.patch

22448f
--- vinagre-3.14.3/plugins/rdp/vinagre-rdp-tab.c
22448f
+++ vinagre-3.14.3/plugins/rdp/vinagre-rdp-tab.c
22448f
@@ -1171,6 +1171,8 @@ open_freerdp (VinagreRdpTab *rdp_tab)
22448f
   VinagreTab           *tab = VINAGRE_TAB (rdp_tab);
22448f
   GtkWindow            *window = GTK_WINDOW (vinagre_tab_get_window (tab));
22448f
   gboolean              success = TRUE;
22448f
+  gboolean              connection_failed;
22448f
+  guint                 authentication_attempts;
22448f
 
22448f
   priv->events = g_queue_new ();
22448f
 
22448f
@@ -1180,17 +1182,22 @@ open_freerdp (VinagreRdpTab *rdp_tab)
22448f
 
22448f
   do
22448f
     {
22448f
+      connection_failed = FALSE;
22448f
+      authentication_attempts = priv->authentication_attempts;
22448f
       /* Run FreeRDP session */
22448f
       success = freerdp_connect (priv->freerdp_session);
22448f
       if (!success)
22448f
         {
22448f
           freerdp_free (priv->freerdp_session);
22448f
           init_freerdp (rdp_tab);
22448f
+          if (authentication_attempts == priv->authentication_attempts)
22448f
+              connection_failed = TRUE;
22448f
         }
22448f
     }
22448f
   while (!success &&
22448f
          priv->authentication_attempts < 3 &&
22448f
-         !priv->authentication_cancelled);
22448f
+         !priv->authentication_cancelled &&
22448f
+         !connection_failed);
22448f
 
22448f
   if (!success)
22448f
     {