# HG changeset patch # User Mark Doliner # Date 1111365806 0 # Node ID cc9922ce3a5225f3bb2e2b7433e5569b99c460a2 # Parent d0d1d631ed4946adbd9da200f94e73711762d91a [gaim-migrate @ 12299] That same DNS fix (for real)^2 from oldstatus. committer: Tailor Script diff -r d0d1d631ed49 -r cc9922ce3a52 src/proxy.c --- a/src/proxy.c Sun Mar 20 17:37:31 2005 +0000 +++ b/src/proxy.c Mon Mar 21 00:43:26 2005 +0000 @@ -425,7 +425,7 @@ static void gaim_dns_childthread(int child_out, int child_in, dns_params_t *dns_params, gboolean show_debug) { - const int zero = 0; + const size_t zero = 0; int rc; #if HAVE_GETADDRINFO struct addrinfo hints, *res, *tmp; @@ -486,8 +486,8 @@ */ hints.ai_socktype = SOCK_STREAM; rc = getaddrinfo(dns_params->hostname, servname, &hints, &res); + write(child_out, &rc, sizeof(rc)); if (rc != 0) { - write(child_out, &rc, sizeof(rc)); close(child_out); if (show_debug) fprintf(stderr,"dns[%d] Error: getaddrinfo returned %d\n", @@ -495,7 +495,6 @@ dns_params->hostname[0] = '\0'; continue; } - write(child_out, &zero, sizeof(zero)); tmp = res; while (res) { size_t ai_addrlen = res->ai_addrlen; @@ -522,7 +521,6 @@ sin.sin_family = AF_INET; sin.sin_port = htons(dns_params->port); - write(child_out, &zero, sizeof(zero)); write(child_out, &addrlen, sizeof(addrlen)); write(child_out, &sin, addrlen); write(child_out, &zero, sizeof(zero));