[vinagre] Get the right port from command line



commit 358b78f4cddda372aec3a7b207913318c04bd352
Author: Jonh Wendell <jwendell gnome org>
Date:   Wed May 27 21:22:24 2009 -0300

    Get the right port from command line
---
 src/vinagre-connection.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vinagre-connection.c b/src/vinagre-connection.c
index 595b236..52b5daf 100644
--- a/src/vinagre-connection.c
+++ b/src/vinagre-connection.c
@@ -581,12 +581,12 @@ vinagre_connection_split_string (const gchar *uri,
   if (g_strrstr (lhost, "::") != NULL)
     {
       server = g_strsplit (lhost, "::", 2);
-      lport = server[1] ? atoi (server[1]) : vinagre_connection_default_port [*protocol];
+      lport = server[1] ? atoi (server[1]) : vinagre_connection_default_port [*protocol-1];
     }
   else
     {
       server = g_strsplit (lhost, ":", 2);
-      lport = server[1] ? atoi (server[1]) : vinagre_connection_default_port [*protocol];
+      lport = server[1] ? atoi (server[1]) : vinagre_connection_default_port [*protocol-1];
 
       if ((*protocol == VINAGRE_CONNECTION_PROTOCOL_VNC) && (lport < 1024))
         lport += 5900;



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