# HG changeset patch # User Luke Schierer <lschiere@pidgin.im> # Date 1091575638 0 # Node ID 5332ebbf437bedfa43765053ae53a1df6c248d79 # Parent 1ea8b1dc2b5aa3e3715e3649de0ac204959a98ea [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> diff -r 1ea8b1dc2b5a -r 5332ebbf437b COPYRIGHT --- 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 diff -r 1ea8b1dc2b5a -r 5332ebbf437b src/proxy.c --- 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;