[evolution-data-server] Bug #601111 - Do not use empty host names in EProxy



commit acc940ada4426a99fbcb2fc1bbac6ffc5cafb699
Author: Milan Crha <mcrha redhat com>
Date:   Mon Feb 7 13:38:31 2011 +0100

    Bug #601111 - Do not use empty host names in EProxy

 libedataserver/e-proxy.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libedataserver/e-proxy.c b/libedataserver/e-proxy.c
index 925cbef..2258d4c 100644
--- a/libedataserver/e-proxy.c
+++ b/libedataserver/e-proxy.c
@@ -619,7 +619,7 @@ ep_set_proxy (GConfClient *client,
 
 	proxy_server = gconf_client_get_string (client, RIGHT_KEY (HTTP_HOST), NULL);
 	proxy_port = gconf_client_get_int (client, RIGHT_KEY (HTTP_PORT), NULL);
-	if (proxy_server != NULL)
+	if (proxy_server != NULL && *proxy_server && !g_ascii_isspace (*proxy_server))
 		uri_http = g_strdup_printf (
 			"http://%s:%d";, proxy_server, proxy_port);
 	else
@@ -629,7 +629,7 @@ ep_set_proxy (GConfClient *client,
 
 	proxy_server = gconf_client_get_string (client, RIGHT_KEY (HTTPS_HOST), NULL);
 	proxy_port = gconf_client_get_int (client, RIGHT_KEY (HTTPS_PORT), NULL);
-	if (proxy_server != NULL)
+	if (proxy_server != NULL && *proxy_server && !g_ascii_isspace (*proxy_server))
 		uri_https = g_strdup_printf (
 			"https://%s:%d";, proxy_server, proxy_port);
 	else



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