src/proxy.c

changeset 9653
ebbb2ea570dd
parent 9227
95c28297b72c
child 9655
7cfd0424ec23
--- a/src/proxy.c	Tue Aug 03 23:24:06 2004 +0000
+++ b/src/proxy.c	Tue Aug 03 23:27:18 2004 +0000
@@ -421,8 +421,10 @@
 {
 	pending_dns_request_t *req = NULL;
 	dns_params_t dns_params;
-
-	strncpy(dns_params.hostname, hostname, sizeof(dns_params.hostname)-1);
+        
+        char *host_temp = g_strdup(hostname);
+	strncpy(dns_params.hostname, g_strstrip(host_temp), sizeof(dns_params.hostname)-1);
+        g_free(host_temp);
 	dns_params.hostname[sizeof(dns_params.hostname)-1] = '\0';
 	dns_params.port = port;
 

mercurial