pidgin: e77e41f9: Ludovico Cavedon noticed that on 64-bit ...

datallah at pidgin.im datallah at pidgin.im
Mon Jan 5 23:16:10 EST 2009


-----------------------------------------------------------------
Revision: e77e41f9dc7472f592076cf3f5fbc829eec7c294
Ancestor: c6844c5e097e3d947d35507e2e93557dfe8e0aee
Author: datallah at pidgin.im
Date: 2009-01-06T04:11:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e77e41f9dc7472f592076cf3f5fbc829eec7c294

Modified files:
        libpurple/dnsquery.c

ChangeLog: 

Ludovico Cavedon noticed that on 64-bit platforms, when HAVE_GETADDRINFO isn't
defined, there is a problem because we write out a size_t and read an int.
Fixes #7733

-------------- next part --------------
============================================================
--- libpurple/dnsquery.c	21a797fa86551f10e97cef0e37ed5069ba01941c
+++ libpurple/dnsquery.c	64dbfdeff054a4c8eb74f1d6edea1f7871e47c3b
@@ -274,7 +274,6 @@ purple_dnsquery_resolver_run(int child_o
 			res = res->ai_next;
 		}
 		freeaddrinfo(tmp);
-		write_to_parent(child_out, &zero, sizeof(zero));
 #else
 		if (!inet_aton(dns_params.hostname, &sin.sin_addr)) {
 			struct hostent *hp;
@@ -292,11 +291,12 @@ purple_dnsquery_resolver_run(int child_o
 			sin.sin_family = AF_INET;
 
 		sin.sin_port = htons(dns_params.port);
-		write_to_parent(child_out, &zero, sizeof(zero));
+		rc = 0;
+		write_to_parent(child_out, &rc, sizeof(rc));
 		write_to_parent(child_out, &addrlen, sizeof(addrlen));
 		write_to_parent(child_out, &sin, addrlen);
+#endif
 		write_to_parent(child_out, &zero, sizeof(zero));
-#endif
 		dns_params.hostname[0] = '\0';
 	}
 


More information about the Commits mailing list