summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Doliner <markdoliner@pidgin.im>2008-09-16 23:37:36 +0000
committerMark Doliner <markdoliner@pidgin.im>2008-09-16 23:37:36 +0000
commit91f5d64e7c5881dcb8c71b4b00ce7a9dcd945729 (patch)
treea1d9d75106ce143d0f70369db20637ae11f997c1
parent12bf1c683fa2fbc1e1cfa9809b93048d662bea9a (diff)
downloadpidgin-91f5d64e7c5881dcb8c71b4b00ce7a9dcd945729.tar.gz
Fix DNS resolution. I think I broke this this morning in my revision
b2b1a42a78168eb8f19ba3398c0058b6a9cac4c5. I changed us to not free the child DNS resolvers, but also to not re-use them. So it would do 4 dns requests then just sit around waiting forever. Now resolvers are added to the list of idle resolvers after they're done resolving.
-rw-r--r--libpurple/dnsquery.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libpurple/dnsquery.c b/libpurple/dnsquery.c
index 7c8c59cafc..c782a1e7aa 100644
--- a/libpurple/dnsquery.c
+++ b/libpurple/dnsquery.c
@@ -108,12 +108,14 @@ purple_dnsquery_resolved(PurpleDnsQueryData *query_data, GSList *hosts)
}
}
+#ifdef PURPLE_DNSQUERY_USE_FORK
/*
- * Set the resolver to NULL so that it doesn't get killed so that
- * it sits around waiting for additional DNS requests for a few
- * seconds longer.
+ * Add the resolver to the list of available resolvers, and set it
+ * to NULL so that it doesn't get destroyed along with the query_data
*/
+ free_dns_children = g_slist_prepend(free_dns_children, query_data->resolver);
query_data->resolver = NULL;
+#endif /* PURPLE_DNSQUERY_USE_FORK */
purple_dnsquery_destroy(query_data);
}