Mercurial > pidgin
changeset 10709:cc9922ce3a52
[gaim-migrate @ 12299]
That same DNS fix (for real)^2 from oldstatus.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 21 Mar 2005 00:43:26 +0000 |
parents | d0d1d631ed49 |
children | a2c0ce632bec |
files | src/proxy.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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));