[vinagre] Allow different logins to the same host



commit 293bdfa6208c618cbaa8cf564aeff7739a74068c
Author: Marek Kasik <mkasik redhat com>
Date:   Tue Feb 23 14:25:26 2016 +0100

    Allow different logins to the same host
    
    Allow to open connection with different usernames to the same host.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746730

 vinagre/vinagre-window.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/vinagre/vinagre-window.c b/vinagre/vinagre-window.c
index 09b4812..bc00d12 100644
--- a/vinagre/vinagre-window.c
+++ b/vinagre/vinagre-window.c
@@ -1103,7 +1103,7 @@ vinagre_window_conn_exists (VinagreWindow *window, VinagreConnection *conn)
 {
   VinagreConnection *c;
   VinagreTab *tab;
-  const gchar *host, *protocol;
+  const gchar *host, *protocol, *username;
   gint port;
   GList *conns, *l;
 
@@ -1111,6 +1111,7 @@ vinagre_window_conn_exists (VinagreWindow *window, VinagreConnection *conn)
   g_return_val_if_fail (VINAGRE_IS_CONNECTION (conn), NULL);
 
   host = vinagre_connection_get_host (conn);
+  username = vinagre_connection_get_username (conn);
   protocol = vinagre_connection_get_protocol (conn);
   port = vinagre_connection_get_port (conn);
 
@@ -1125,6 +1126,7 @@ vinagre_window_conn_exists (VinagreWindow *window, VinagreConnection *conn)
       c = VINAGRE_CONNECTION (l->data);
 
       if (!strcmp (host, vinagre_connection_get_host (c)) &&
+         g_strcmp0 (username, vinagre_connection_get_username (c)) == 0 &&
          !strcmp (protocol, vinagre_connection_get_protocol (c)) &&
          port == vinagre_connection_get_port (c))
        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]