vinagre r318 - in trunk: . src



Author: jwendell
Date: Tue May  6 13:01:35 2008
New Revision: 318
URL: http://svn.gnome.org/viewvc/vinagre?rev=318&view=rev

Log:
2008-05-06  Jonh Wendell <jwendell gnome org>

	* src/vinagre-connection.c: Support for host::port, patch from
	Henrik Holst, closes #501165.


Modified:
   trunk/ChangeLog
   trunk/src/vinagre-connection.c

Modified: trunk/src/vinagre-connection.c
==============================================================================
--- trunk/src/vinagre-connection.c	(original)
+++ trunk/src/vinagre-connection.c	Tue May  6 13:01:35 2008
@@ -461,9 +461,21 @@
   else
     host = (gchar *) uri;
 
-  server = g_strsplit (host, ":", 2);
+  if (g_strrstr (host, "::") != NULL)
+    {
+      server = g_strsplit (host, "::", 2);
+      port = server[1] ? atoi (server[1]) : 5900;
+    }
+  else
+    {
+      server = g_strsplit (host, ":", 2);
+      port = server[1] ? atoi (server[1]) : 5900;
+
+      if (port < 1024)
+        port += 5900;
+    }
+
   host = server[0];
-  port = server[1] ? atoi (server[1]) : 5900;
 
   conn = vinagre_bookmarks_exists (vinagre_bookmarks_get_default (),
                                    host,



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