changeset 20333:53afc5cce143

applied changes from d4b316d73ebaf93803ca2642e78b8821c3b5d5c7 through b219fc7a61d692d47953984814f7b4d882f20291 applied changes from b219fc7a61d692d47953984814f7b4d882f20291 through f8476716fbd7f56dd6fe9fd371a8f5429b12d483 applied changes from f8476716fbd7f56dd6fe9fd371a8f5429b12d483 through 2e96e2466f643bc1f895f5983c1c0ecb9730498c applied changes from 2e96e2466f643bc1f895f5983c1c0ecb9730498c through 16d908d77101c3eb83632a6b9febef6d5ee96481 applied changes from 16d908d77101c3eb83632a6b9febef6d5ee96481 through 9207c76719cf14838d6306432140b3f0da9225ae
author Luke Schierer <lschiere@pidgin.im>
date Fri, 19 Oct 2007 18:28:33 +0000
parents 3a9709bfde65
children 58a57a0ca807
files libpurple/protocols/jabber/chat.c libpurple/protocols/jabber/google.c libpurple/protocols/jabber/iq.c libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/roster.c
diffstat 5 files changed, 10 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/chat.c	Fri Oct 19 18:27:12 2007 +0000
+++ b/libpurple/protocols/jabber/chat.c	Fri Oct 19 18:28:33 2007 +0000
@@ -964,7 +964,7 @@
 static void jabber_chat_disco_traffic_cb(JabberStream *js, xmlnode *packet, gpointer data)
 {
 	JabberChat *chat;
-	xmlnode *query;
+	/*xmlnode *query;*/
 	int id = GPOINTER_TO_INT(data);
 
 	if(!(chat = jabber_chat_find_by_id(js, id)))
@@ -974,6 +974,8 @@
 	 * support this request */
 	chat->xhtml = TRUE;
 
+	/* disabling this until more MUC servers support
+	 * announcing this
 	if(xmlnode_get_child(packet, "error")) {
 		return;
 	}
@@ -981,8 +983,6 @@
 	if(!(query = xmlnode_get_child(packet, "query")))
 		return;
 
-	/* disabling this until more MUC servers support
-	 * announcing this
 	chat->xhtml = FALSE;
 
 	for(x = xmlnode_get_child(query, "feature"); x; x = xmlnode_get_next_twin(x)) {
--- a/libpurple/protocols/jabber/google.c	Fri Oct 19 18:27:12 2007 +0000
+++ b/libpurple/protocols/jabber/google.c	Fri Oct 19 18:28:33 2007 +0000
@@ -110,7 +110,7 @@
 		tos[i] = (to_name != NULL ?  to_name : "");
 		froms[i] = (from != NULL ?  from : "");
 		subjects[i] = (subject != NULL ? subject : g_strdup(""));
-		urls[i] = (url != NULL ? url : "");
+		urls[i] = url;
 
 		tid = xmlnode_get_attrib(message, "tid");
 		if (tid &&
--- a/libpurple/protocols/jabber/iq.c	Fri Oct 19 18:27:12 2007 +0000
+++ b/libpurple/protocols/jabber/iq.c	Fri Oct 19 18:28:33 2007 +0000
@@ -248,7 +248,6 @@
 	JabberIq *iq;
 	const char *type, *from, *id;
 	xmlnode *query;
-	char *os = NULL;
 
 	type = xmlnode_get_attrib(packet, "type");
 
@@ -256,6 +255,7 @@
 		GHashTable *ui_info;
 		const char *ui_name = NULL, *ui_version = NULL;
 #if 0
+		char *os = NULL;
 		if(!purple_prefs_get_bool("/plugins/prpl/jabber/hide_os")) {
 			struct utsname osinfo;
 
@@ -290,10 +290,12 @@
 			xmlnode_insert_data(xmlnode_new_child(query, "version"), VERSION, -1);
 		}
 
+#if 0
 		if(os) {
 			xmlnode_insert_data(xmlnode_new_child(query, "os"), os, -1);
 			g_free(os);
 		}
+#endif
 
 		jabber_iq_send(iq);
 	}
--- a/libpurple/protocols/jabber/jabber.c	Fri Oct 19 18:27:12 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Fri Oct 19 18:28:33 2007 +0000
@@ -1914,7 +1914,7 @@
 			text = _("Authentication Failure");
 		}
 	} else if(!strcmp(packet->name, "stream:error") ||
-			 (!strcmp(packet->name, "error") &&
+			 (!strcmp(packet->name, "error") && xmlns &&
 				!strcmp(xmlns, "http://etherx.jabber.org/streams"))) {
 		if(xmlnode_get_child(packet, "bad-format")) {
 			text = _("Bad Format");
--- a/libpurple/protocols/jabber/roster.c	Fri Oct 19 18:27:12 2007 +0000
+++ b/libpurple/protocols/jabber/roster.c	Fri Oct 19 18:28:33 2007 +0000
@@ -403,12 +403,12 @@
 void jabber_roster_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy,
 		PurpleGroup *group) {
 	GSList *buddies = purple_find_buddies(gc->account, buddy->name);
-	GSList *groups = NULL;
 
 	buddies = g_slist_remove(buddies, buddy);
 	if(buddies != NULL) {
 		PurpleBuddy *tmpbuddy;
 		PurpleGroup *tmpgroup;
+		GSList *groups = NULL;
 
 		while(buddies) {
 			tmpbuddy = buddies->data;
@@ -418,6 +418,7 @@
 		}
 
 		jabber_roster_update(gc->proto_data, buddy->name, groups);
+		g_slist_free(groups);
 	} else {
 		JabberIq *iq = jabber_iq_new_query(gc->proto_data, JABBER_IQ_SET,
 				"jabber:iq:roster");
@@ -429,9 +430,4 @@
 
 		jabber_iq_send(iq);
 	}
-
-	if(buddies)
-		g_slist_free(buddies);
-	if(groups)
-		g_slist_free(groups);
 }