# HG changeset patch # User Paul Aurich # Date 1257034358 0 # Node ID 4370819b97ff6c8ceb7a258bd8e2407d9dcb4750 # Parent 1c6c53143afe39fc56c7a7b7f67d0e2001714533 dns: I don't think this worked correctly before. Closing child_out and then continuing means that this DNS child would hang around but have no means of communicating to the parent. I added one of these, but the second has existed since the DNS forking was introduced way back in fb8fbdd2118703058de16589570503043bc588fd. Instead, let's take the safe route and just kill off the child in these circumstances. diff -r 1c6c53143afe -r 4370819b97ff libpurple/dnsquery.c --- a/libpurple/dnsquery.c Sat Oct 31 22:25:22 2009 +0000 +++ b/libpurple/dnsquery.c Sun Nov 01 00:12:38 2009 +0000 @@ -295,12 +295,11 @@ rc = purple_network_convert_idn_to_ascii(dns_params.hostname, &hostname); if (rc != 0) { write_to_parent(child_out, &rc, sizeof(rc)); - close(child_out); if (show_debug) fprintf(stderr, "dns[%d] Error: IDN conversion returned " "%d\n", getpid(), rc); dns_params.hostname[0] = '\0'; - continue; + break; } } else /* intentional to execute the g_strdup */ #endif @@ -325,14 +324,13 @@ rc = getaddrinfo(hostname, servname, &hints, &res); write_to_parent(child_out, &rc, sizeof(rc)); if (rc != 0) { - close(child_out); if (show_debug) printf("dns[%d] Error: getaddrinfo returned %d\n", getpid(), rc); dns_params.hostname[0] = '\0'; g_free(hostname); hostname = NULL; - continue; + break; } tmp = res; while (res) {