|
|
22448f |
From 625811155b4114b5504e6cf3e7f7888b6eb669ad Mon Sep 17 00:00:00 2001
|
|
|
22448f |
From: Marek Kasik <mkasik@redhat.com>
|
|
|
22448f |
Date: Tue, 23 Feb 2016 14:25:26 +0100
|
|
|
22448f |
Subject: [PATCH] Allow different logins to the same host
|
|
|
22448f |
|
|
|
22448f |
Allow to open connection with different usernames to the same host.
|
|
|
22448f |
|
|
|
22448f |
https://bugzilla.gnome.org/show_bug.cgi?id=746730
|
|
|
22448f |
---
|
|
|
22448f |
vinagre/vinagre-window.c | 4 +++-
|
|
|
22448f |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
22448f |
|
|
|
22448f |
diff --git a/vinagre/vinagre-window.c b/vinagre/vinagre-window.c
|
|
|
22448f |
index 09b4812..bc00d12 100644
|
|
|
22448f |
--- a/vinagre/vinagre-window.c
|
|
|
22448f |
+++ b/vinagre/vinagre-window.c
|
|
|
22448f |
@@ -1103,7 +1103,7 @@ vinagre_window_conn_exists (VinagreWindow *window, VinagreConnection *conn)
|
|
|
22448f |
{
|
|
|
22448f |
VinagreConnection *c;
|
|
|
22448f |
VinagreTab *tab;
|
|
|
22448f |
- const gchar *host, *protocol;
|
|
|
22448f |
+ const gchar *host, *protocol, *username;
|
|
|
22448f |
gint port;
|
|
|
22448f |
GList *conns, *l;
|
|
|
22448f |
|
|
|
22448f |
@@ -1111,6 +1111,7 @@ vinagre_window_conn_exists (VinagreWindow *window, VinagreConnection *conn)
|
|
|
22448f |
g_return_val_if_fail (VINAGRE_IS_CONNECTION (conn), NULL);
|
|
|
22448f |
|
|
|
22448f |
host = vinagre_connection_get_host (conn);
|
|
|
22448f |
+ username = vinagre_connection_get_username (conn);
|
|
|
22448f |
protocol = vinagre_connection_get_protocol (conn);
|
|
|
22448f |
port = vinagre_connection_get_port (conn);
|
|
|
22448f |
|
|
|
22448f |
@@ -1125,6 +1126,7 @@ vinagre_window_conn_exists (VinagreWindow *window, VinagreConnection *conn)
|
|
|
22448f |
c = VINAGRE_CONNECTION (l->data);
|
|
|
22448f |
|
|
|
22448f |
if (!strcmp (host, vinagre_connection_get_host (c)) &&
|
|
|
22448f |
+ g_strcmp0 (username, vinagre_connection_get_username (c)) == 0 &&
|
|
|
22448f |
!strcmp (protocol, vinagre_connection_get_protocol (c)) &&
|
|
|
22448f |
port == vinagre_connection_get_port (c))
|
|
|
22448f |
{
|
|
|
22448f |
--
|
|
|
22448f |
2.5.0
|
|
|
22448f |
|