changeset 9653:5332ebbf437b

[gaim-migrate @ 10501] " Regarding that bug, I simply wrapped the the assignment of hostname to dns_params.hostname with g_strstrip(). This allows a lookup by name of a host that had whitespace after the server hostname (also works if there is whitespace before the hostname now)" -- jlapenna committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 03 Aug 2004 23:27:18 +0000
parents 1ea8b1dc2b5a
children a735419f77ee
files COPYRIGHT src/proxy.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Tue Aug 03 23:24:06 2004 +0000
+++ b/COPYRIGHT	Tue Aug 03 23:27:18 2004 +0000
@@ -76,6 +76,7 @@
 Tero Kuusela
 Scott Lamb
 Dennis Lambe Jr.
+Joe LaPenna
 Daniel Larsson
 Ho-seok Lee
 Moses Lei
--- 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;