im.pidgin.pidgin.2.2.2: 637fe13953919c726f6f43db8b36a2c426d30e28
lschiere at pidgin.im
lschiere at pidgin.im
Fri Oct 19 17:12:23 EDT 2007
-----------------------------------------------------------------
Revision: 637fe13953919c726f6f43db8b36a2c426d30e28
Ancestor: 205d3bc3e99d5f2036d3eb97ae7194d62a9f9bf5
Author: lschiere at pidgin.im
Date: 2007-10-19T17:42:21
Branch: im.pidgin.pidgin.2.2.2
Modified files:
libpurple/dnsquery.c
ChangeLog:
applied changes from 77376fe079e753b612b3b8c901060e689f3dee11
through 077670cb60ab530215573771befe704110370be0
-------------- next part --------------
============================================================
--- libpurple/dnsquery.c e3aec839245d62f0f23611a9e668b88dc73ff2ce
+++ libpurple/dnsquery.c 0ddd5e827518101947da5f67acc3b436926f83bc
@@ -637,9 +637,10 @@ dns_main_thread_cb(gpointer data)
static gboolean
dns_main_thread_cb(gpointer data)
{
- PurpleDnsQueryData *query_data;
+ PurpleDnsQueryData *query_data = data;
- query_data = data;
+ /* We're done, so purple_dnsquery_destroy() shouldn't think it is canceling an in-progress lookup */
+ query_data->resolver = NULL;
if (query_data->error_message != NULL)
purple_dnsquery_failed(query_data, query_data->error_message);
@@ -713,7 +714,7 @@ dns_thread(gpointer data)
#endif
/* back to main thread */
- g_idle_add(dns_main_thread_cb, query_data);
+ purple_timeout_add(0, dns_main_thread_cb, query_data);
return 0;
}
@@ -780,14 +781,12 @@ purple_dnsquery_a(const char *hostname,
purple_debug_info("dnsquery", "Performing DNS lookup for %s\n", hostname);
- query_data = g_new(PurpleDnsQueryData, 1);
+ query_data = g_new0(PurpleDnsQueryData, 1);
query_data->hostname = g_strdup(hostname);
g_strstrip(query_data->hostname);
query_data->port = port;
query_data->callback = callback;
query_data->data = data;
- query_data->error_message = NULL;
- query_data->hosts = NULL;
if (strlen(query_data->hostname) == 0)
{
More information about the Commits
mailing list