[vinagre] fix bug #606976 - spaces at end of hostname cause connection failure



commit daec0c408aecf0e11ea2d16a3092227dcaac7468
Author: Jonh Wendell <jwendell gnome org>
Date:   Fri Jan 29 16:57:06 2010 -0300

    fix bug #606976 - spaces at end of hostname cause connection failure

 vinagre/vinagre-connection.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vinagre/vinagre-connection.c b/vinagre/vinagre-connection.c
index 14c8acb..42ac4a3 100644
--- a/vinagre/vinagre-connection.c
+++ b/vinagre/vinagre-connection.c
@@ -370,7 +370,10 @@ vinagre_connection_set_host (VinagreConnection *conn,
   g_return_if_fail (VINAGRE_IS_CONNECTION (conn));
 
   g_free (conn->priv->host);
-  conn->priv->host = g_strdup (host);
+  if (host)
+    conn->priv->host = g_strdup (g_strstrip ((gchar *)host));
+  else
+    conn->priv->host = NULL;
 }
 const gchar *
 vinagre_connection_get_host (VinagreConnection *conn)



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