changeset 20786:996cc19d1f7e

merge of '077670cb60ab530215573771befe704110370be0' and '246d6966366baf94241a3df262da58486a8a7835'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 05 Oct 2007 06:24:13 +0000
parents 6da14d538231 (diff) e587a7be2916 (current diff)
children bbae118811a1 c3f27488c344
files
diffstat 5 files changed, 18 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dnsquery.c	Fri Oct 05 06:13:44 2007 +0000
+++ b/libpurple/dnsquery.c	Fri Oct 05 06:24:13 2007 +0000
@@ -637,9 +637,10 @@
 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 @@
 #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_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)
 	{
--- a/libpurple/plugins/log_reader.c	Fri Oct 05 06:13:44 2007 +0000
+++ b/libpurple/plugins/log_reader.c	Fri Oct 05 06:24:13 2007 +0000
@@ -2271,6 +2271,7 @@
 			                   "Error reading talk.ini\n");
 			if (error)
 				g_error_free(error);
+			g_free(path);
 		} else {
 			char *line = contents;
 			while (*contents) {
@@ -2318,6 +2319,9 @@
 	                        "default", "logs", NULL);
 #endif
 
+	/*XXX: Why do we even bother allocating it ? */
+	g_free(path);
+
 
 	/* Add QIP log directory preference. */
 	purple_prefs_add_none("/plugins/core/log_reader/qip");
--- a/libpurple/protocols/jabber/google.c	Fri Oct 05 06:13:44 2007 +0000
+++ b/libpurple/protocols/jabber/google.c	Fri Oct 05 06:24:13 2007 +0000
@@ -231,7 +231,7 @@
 	const char *jid = xmlnode_get_attrib(item, "jid");
 	gboolean on_block_list = FALSE;
 
-	char *jid_norm = g_strdup(jabber_normalize(account, jid));
+	char *jid_norm;
 
 	const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster");
 	const char *subscription = xmlnode_get_attrib(item, "subscription");
@@ -243,6 +243,8 @@
 		return FALSE;
 	}
 
+ 	jid_norm = g_strdup(jabber_normalize(account, jid));
+
 	while (list) {
 		if (!strcmp(jid_norm, (char*)list->data)) {
 			on_block_list = TRUE;
--- a/libpurple/protocols/jabber/presence.c	Fri Oct 05 06:13:44 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Fri Oct 05 06:24:13 2007 +0000
@@ -378,7 +378,8 @@
 			break;
 		}
 	}
-	g_free(user_data);
+	g_free(userdata->from);
+	g_free(userdata);
 }
 
 void jabber_presence_parse(JabberStream *js, xmlnode *packet)
--- a/pidgin/plugins/ticker/ticker.c	Fri Oct 05 06:13:44 2007 +0000
+++ b/pidgin/plugins/ticker/ticker.c	Fri Oct 05 06:24:13 2007 +0000
@@ -124,8 +124,10 @@
 static gboolean buddy_ticker_set_pixmap_cb(gpointer data) {
 	TickerData *td = data;
 
-	buddy_ticker_update_contact(td->contact);
-	td->timeout = 0;
+	if (g_list_find(tickerbuds, td) != NULL) {
+		buddy_ticker_update_contact(td->contact);
+		td->timeout = 0;
+	}
 
 	return FALSE;
 }