pidgin: e550112b: Fix DNS resolution. I think I broke thi...

markdoliner at pidgin.im markdoliner at pidgin.im
Tue Sep 16 19:40:52 EDT 2008


-----------------------------------------------------------------
Revision: e550112b97817b0eafc647bd8c0adddf2a262a62
Ancestor: 7aaca1d66aee8c4f1b292b419d8527c11fe85072
Author: markdoliner at pidgin.im
Date: 2008-09-16T23:37:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e550112b97817b0eafc647bd8c0adddf2a262a62

Modified files:
        libpurple/dnsquery.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/dnsquery.c	1eea218d0ea86bb61dffb89b1897d4f0f3cea8a4
+++ libpurple/dnsquery.c	e784d0240fbe55bc56419baf455cce1e160e4034
@@ -108,12 +108,14 @@ purple_dnsquery_resolved(PurpleDnsQueryD
 		}
 	}
 
+#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);
 }


More information about the Commits mailing list