[vinagre] Allow only specifying a port number to connect to localhost.



commit 6b2533f8bf78584d84dd4e8038e5e82d6196a063
Author: Jonh Wendell <jwendell gnome org>
Date:   Mon Aug 10 11:27:11 2009 -0300

    Allow only specifying a port number to connect to localhost.
    
    Closes #586736.

 vinagre/vinagre-connection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vinagre/vinagre-connection.c b/vinagre/vinagre-connection.c
index 020ac09..70c711a 100644
--- a/vinagre/vinagre-connection.c
+++ b/vinagre/vinagre-connection.c
@@ -549,7 +549,7 @@ vinagre_connection_split_string (const gchar *uri,
         lport += 5900;
     }
 
-  lhost = ipv6_host[0] ? ipv6_host : server[0];
+  lhost = ipv6_host[0] ? ipv6_host : (server[0][0] ? server[0] : "localhost");
 
   *host = g_strdup (lhost);
   *port = lport;



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