changeset 24126:cd35c0f680b9

Fix DNS resolution. I think I broke this this morning in my revision 3ffe6fd197f037185a0012875ef68c8f6d6c2f89. 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.
author Mark Doliner <mark@kingant.net>
date Tue, 16 Sep 2008 23:37:36 +0000
parents f323cdae2404
children ce51405b7a7e 824e346c5713 883e6318883f
files libpurple/dnsquery.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dnsquery.c	Tue Sep 16 23:35:45 2008 +0000
+++ b/libpurple/dnsquery.c	Tue Sep 16 23:37:36 2008 +0000
@@ -108,12 +108,14 @@
 		}
 	}
 
+#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);
 }