im.pidgin.pidgin.2.2.2: 55397f7fb97c419362de5f491ae92076e7e04ada

lschiere at pidgin.im lschiere at pidgin.im
Sat Oct 20 12:20:38 EDT 2007


-----------------------------------------------------------------
Revision: 55397f7fb97c419362de5f491ae92076e7e04ada
Ancestor: 406fe93bfe587069d37aed16cb51775d032b7659
Author: lschiere at pidgin.im
Date: 2007-10-20T15:57:22
Branch: im.pidgin.pidgin.2.2.2

Modified files:
        libpurple/protocols/myspace/message.c
        libpurple/protocols/myspace/myspace.c
        libpurple/protocols/oscar/oscar.c
        libpurple/protocols/qq/buddy_info.c
        libpurple/protocols/sametime/sametime.c
        libpurple/protocols/yahoo/yahoo_aliases.c
        libpurple/xmlnode.c pidgin/gtkaccount.c

ChangeLog: 

applied changes from 9d35dde0c779cca73548172223ba557f27d61882
             through cd26f6af7f8ee75ef909ae08b06ad5a1978051d9

-------------- next part --------------
============================================================
--- libpurple/protocols/myspace/message.c	19818f7c026c6e17696b19ad8af7087633baa252
+++ libpurple/protocols/myspace/message.c	ba8b2b07ae68f22d15e6f95f3ebb95cade25ddaa
@@ -314,7 +314,7 @@ msim_msg_clone_element(gpointer data, gp
 	MsimMessageElement *elem;
 	MsimMessage **new;
 	gpointer new_data;
-				
+
 	GString *gs;
 	MsimMessage *dict;
 
@@ -349,7 +349,7 @@ msim_msg_clone_element(gpointer data, gp
 
 		default:
 			purple_debug_info("msim", "msim_msg_clone_element: unknown type %d\n", elem->type);
-			g_return_if_fail(NULL);
+			g_return_if_reached();
 	}
 
 	/* Append cloned data. Note that the 'name' field is a static string, so it
@@ -905,7 +905,7 @@ msim_msg_pack_element(gpointer data, gpo
 
 		default:
 			g_free(data_string);
-			g_return_if_fail(FALSE);
+			g_return_if_reached();
 			break;
 	}
 
============================================================
--- libpurple/protocols/myspace/myspace.c	e02fdcb67b22a8e7a9b07852c54a3e1125b565fb
+++ libpurple/protocols/myspace/myspace.c	2792892dc89913a1b3a1e6403813e6c253df415c
@@ -2030,18 +2030,14 @@ msim_do_postprocessing(MsimMessage *msg,
 msim_do_postprocessing(MsimMessage *msg, const gchar *uid_before, 
 		const gchar *uid_field_name, guint uid)
 {
+	MsimMessageElement *elem;
 	msim_msg_dump("msim_do_postprocessing msg: %s\n", msg);
 
 	/* First, check - if the field already exists, replace <uid> within it */
-	if (msim_msg_get(msg, uid_field_name)) {
-		MsimMessageElement *elem;
+	if ((elem = msim_msg_get(msg, uid_field_name)) != NULL) {
 		gchar *fmt_string;
 		gchar *uid_str, *new_str;
 
-		/* Warning: this is a delicate, but safe, operation */
-
-		elem = msim_msg_get(msg, uid_field_name);
-
 		/* Get the packed element, flattening it. This allows <uid> to be
 		 * replaced within nested data structures, since the replacement is done
 		 * on the linear, packed data, not on a complicated data structure.
============================================================
--- libpurple/protocols/oscar/oscar.c	8df1c7a8fd7714a246180992e01a7bda48f43a61
+++ libpurple/protocols/oscar/oscar.c	379e968b0d240132dea236869db9d3b74f33045c
@@ -1128,8 +1128,10 @@ flap_connection_established_chat(OscarDa
 	aim_clientready(od, conn);
 
 	chatcon = find_oscar_chat_by_conn(gc, conn);
-	chatcon->id = id;
-	chatcon->conv = serv_got_joined_chat(gc, id++, chatcon->show);
+	if (chatcon) {
+		chatcon->id = id;
+		chatcon->conv = serv_got_joined_chat(gc, id++, chatcon->show);
+	}
 }
 
 static void
============================================================
--- libpurple/protocols/qq/buddy_info.c	2d2fe04a9e9ee9a98bdbc84d04fc4b85859a927a
+++ libpurple/protocols/qq/buddy_info.c	f990764d84fde0356db683bd43443b08aa111f2c
@@ -366,8 +366,9 @@ static void modify_info_ok_cb(modify_inf
 	groups = g_list_remove_link(groups, groups);
 	list = purple_request_field_group_get_fields(groups->data);
 	info->intro = parse_field(&list, FALSE);
-	groups = g_list_remove_link(groups, groups);
 
+	g_list_free(groups);
+
 	qq_send_packet_modify_info(gc, (gchar **) info);
 
 	g_strfreev((gchar **) mid->info);
============================================================
--- libpurple/protocols/sametime/sametime.c	4463e0fae00f673df1a3b8a9345978861540b6a1
+++ libpurple/protocols/sametime/sametime.c	9492835d905c925629542049b4768598fd40bff8
@@ -5563,7 +5563,7 @@ static void search_resolved(struct mwSer
     msgA = _("No matches");
     msgB = _("The identifier '%s' did not match any users in your"
 	     " Sametime community.");
-    msg = g_strdup_printf(msgB, NSTR(res->name));
+    msg = g_strdup_printf(msgB, (res && res->name) ? NSTR(res->name) : "");
 
     purple_notify_error(gc, _("No Matches"), msgA, msg);
 
============================================================
--- libpurple/protocols/yahoo/yahoo_aliases.c	d9267270d7ee9084c8c3194831b42beb5bd05dd1
+++ libpurple/protocols/yahoo/yahoo_aliases.c	864966ba7de997ee3ababe78354456e6ca4a58b8
@@ -117,7 +117,7 @@ yahoo_fetch_aliases_cb(PurpleUtilFetchUr
 					if (alias != NULL) {
 						serv_got_alias(cb->gc, yid, alias);
 						purple_debug_info("yahoo","Fetched alias '%s' (%s)\n",alias,id);
-					} else if (g_strcasecmp((alias!=NULL?alias:""),(b->alias!=NULL?b->alias:"")) != 0) {
+					} else if (b->alias != alias && strcmp(b->alias, "") != 0) {
 					/* Or if we have an alias that Yahoo doesn't, send it up */
 						yahoo_update_alias(cb->gc, yid, b->alias);
 						purple_debug_info("yahoo","Sent alias '%s'\n", b->alias);
@@ -216,7 +216,7 @@ yahoo_update_alias(PurpleConnection *gc,
 	struct callback_data *cb;
 	PurpleBuddy *buddy;
 	PurpleUtilFetchUrlData *url_data;
-   
+
 	g_return_if_fail(alias!= NULL);
 	g_return_if_fail(who!=NULL);
 	g_return_if_fail(gc!=NULL);
@@ -224,7 +224,7 @@ yahoo_update_alias(PurpleConnection *gc,
 	purple_debug_info("yahoo", "Sending '%s' as new alias for user '%s'.\n",alias, who);
 
 	buddy = purple_find_buddy(gc->account, who);
-	if (buddy->proto_data == NULL) {
+	if (buddy == NULL || buddy->proto_data == NULL) {
 		purple_debug_info("yahoo", "Missing proto_data (get_yahoo_aliases must have failed), bailing out\n");
 		return;
 	}
============================================================
--- libpurple/xmlnode.c	301d2cff5e70a31ea398472724dbd6d27e73a3ea
+++ libpurple/xmlnode.c	30f07eb32a368a46c334da23dd104007c86d5b11
@@ -131,7 +131,7 @@ xmlnode_remove_attrib(xmlnode *node, con
 		if(attr_node->type == XMLNODE_TYPE_ATTRIB &&
 				!strcmp(attr_node->name, attr))
 		{
-			if(node->child == attr_node) {
+			if(sibling == NULL) {
 				node->child = attr_node->next;
 			} else {
 				sibling->next = attr_node->next;
@@ -174,7 +174,7 @@ xmlnode_remove_attrib_with_namespace(xml
 		   !strcmp(attr_node->name, attr) &&
 		   _xmlnode_compare_xmlns(xmlns, attr_node->xmlns))
 		{
-			if(node->child == attr_node) {
+			if(sibling == NULL) {
 				node->child = attr_node->next;
 			} else {
 				sibling->next = attr_node->next;
============================================================
--- pidgin/gtkaccount.c	586d9237b30a48b007333a631ba34d92ee263d48
+++ pidgin/gtkaccount.c	1a3403ea21c87a3425faaad3c238c87ebc0be0c6
@@ -1328,8 +1328,9 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
 					break;
 
 				case PURPLE_PREF_STRING_LIST:
-					gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter);
-					gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(widget)), &iter, 1, &value2, -1);
+					value2 = NULL;
+					if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter))
+						gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(widget)), &iter, 1, &value2, -1);
 					purple_account_set_string(account, setting, value2);
 					break;
 


More information about the Commits mailing list