Mercurial > pidgin.yaz
changeset 24010:f085e284f2df
Currently when a child dns resolver process reads a domain name from
the parent, the child sends the letter 'Y' to the parent to let it
know that it received the request. I don't see how we would gain
anything from this, and I don't see how it would help avoid any sort
of race condition (beside, we should be eliminating race conditions,
not just avoiding them), so I'm removing it.
If you think this is really needed for some reason please let me know
(or just revert it)
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 10 Sep 2008 21:32:50 +0000 |
parents | 4ada5e2189d6 |
children | 005649461c77 |
files | libpurple/dnsquery.c |
diffstat | 1 files changed, 0 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dnsquery.c Tue Sep 09 11:54:21 2008 +0000 +++ b/libpurple/dnsquery.c Wed Sep 10 21:32:50 2008 +0000 @@ -209,7 +209,6 @@ * the result back to our parent, when finished. */ while (1) { - const char ch = 'Y'; fd_set fds; struct timeval tv = { .tv_sec = 40 , .tv_usec = 0 }; FD_ZERO(&fds); @@ -237,8 +236,6 @@ dns_params.port); _exit(1); } - /* Tell our parent that we read the data successfully */ - write_to_parent(child_out, &ch, sizeof(ch)); /* We have the hostname and port, now resolve the IP */ @@ -426,7 +423,6 @@ pid_t pid; dns_params_t dns_params; int rc; - char ch; /* This waitpid might return the child's PID if it has recently * exited, or it might return an error if it exited "long @@ -461,17 +457,6 @@ g_return_val_if_fail(rc == sizeof(dns_params), -1); - /* Did you hear me? (This avoids some race conditions) */ - rc = read(resolver->fd_out, &ch, sizeof(ch)); - if (rc != 1 || ch != 'Y') - { - purple_debug_warning("dns", - "DNS child %d not responding. Killing it!\n", - resolver->dns_pid); - purple_dnsquery_resolver_destroy(resolver); - return FALSE; - } - purple_debug_info("dns", "Successfully sent DNS request to child %d\n", resolver->dns_pid);