changeset 31704:65999cb4fc40

merge of '4f105e3377f4f4857b76c46669e414e45bdde0d1' and 'b84653f183486a9171a8900c372a9e8545d3b03b'
author Evan Schoenberg <evan.s@dreskin.net>
date Mon, 21 Feb 2011 22:57:30 +0000
parents 97cb163727f0 (current diff) 1192dade09c9 (diff)
children 43f75716a233
files libpurple/conversation.c
diffstat 5 files changed, 16 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Feb 21 22:56:01 2011 +0000
+++ b/ChangeLog	Mon Feb 21 22:57:30 2011 +0000
@@ -4,6 +4,10 @@
 	General:
 	* Our bundled libgadu should now build on HP-UX.
 
+	AIM:
+	* Fix a bug where some buddies from your buddy list might not show up.
+	  Affected non-English ICQ users the most. (#13386)
+
 	XMPP:
 	* Fix building on platforms with an older glib (inadvertantly broken in
 	  2.7.10).  (#13329)
--- a/libpurple/conversation.c	Mon Feb 21 22:56:01 2011 +0000
+++ b/libpurple/conversation.c	Mon Feb 21 22:57:30 2011 +0000
@@ -1218,15 +1218,15 @@
 
 	c = purple_conv_im_get_conversation(im);
 
+    if ((flags & PURPLE_MESSAGE_RECV) == PURPLE_MESSAGE_RECV) {
+		purple_conv_im_set_typing_state(im, PURPLE_NOT_TYPING);
+	}
+
 	/* Pass this on to either the ops structure or the default write func. */
 	if (c->ui_ops != NULL && c->ui_ops->write_im != NULL)
 		c->ui_ops->write_im(c, who, message, flags, mtime);
 	else
 		purple_conversation_write(c, who, message, flags, mtime);
-
-	if ((flags & PURPLE_MESSAGE_RECV) == PURPLE_MESSAGE_RECV) {
-		purple_conv_im_set_typing_state(im, PURPLE_NOT_TYPING);
-	}
 }
 
 gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what)
--- a/libpurple/protocols/jabber/jabber.c	Mon Feb 21 22:56:01 2011 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Mon Feb 21 22:57:30 2011 +0000
@@ -1984,10 +1984,6 @@
 	jabber_remove_feature(namespace);
 
 	jabber_features = g_list_append(jabber_features, feat);
-
-	/* Our cached caps_hash, if present, is now incorrect; force recalculation next time it is needed */
-	g_free(js->caps_hash);
-	js->caps_hash = NULL;
 }
 
 void jabber_remove_feature(const char *namespace) {
@@ -2069,10 +2065,6 @@
 	ident->name = g_strdup(name);
 	jabber_identities = g_list_insert_sorted(jabber_identities, ident,
 	                                         jabber_identity_compare);
-
-	/* Our cached caps_hash, if present, is now incorrect; force recalculation next time it is needed */
-	g_free(js->caps_hash);
-	js->caps_hash = NULL;	
 }
 
 static void jabber_identities_destroy(void)
--- a/libpurple/protocols/oscar/family_feedbag.c	Mon Feb 21 22:56:01 2011 +0000
+++ b/libpurple/protocols/oscar/family_feedbag.c	Mon Feb 21 22:57:30 2011 +0000
@@ -824,7 +824,7 @@
 		return -EINVAL;
 
 	if (aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000) == NULL)
-		aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, list_type, NULL);
+		aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL);
 
 	aim_ssi_itemlist_add(&od->ssi.local, name, 0x0000, 0xFFFF, list_type, NULL);
 	return aim_ssi_sync(od);
--- a/libpurple/protocols/oscar/oscar.c	Mon Feb 21 22:56:01 2011 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Mon Feb 21 22:57:30 2011 +0000
@@ -4000,9 +4000,12 @@
 	/*** Begin code for adding from server list to local list ***/
 
 	for (curitem=od->ssi.local; curitem; curitem=curitem->next) {
-		if (curitem->name && !g_utf8_validate(curitem->name, -1, NULL))
+		if (curitem->name && !g_utf8_validate(curitem->name, -1, NULL)) {
 			/* Got node with invalid UTF-8 in the name.  Skip it. */
-			break;
+			purple_debug_warning("oscar", "ssi: server list contains item of "
+					"type 0x%04hhx with a non-utf8 name\n", curitem->type);
+			continue;
+		}
 
 		switch (curitem->type) {
 			case AIM_SSI_TYPE_BUDDY: { /* Buddy */
@@ -4051,17 +4054,10 @@
 			} break;
 
 			case AIM_SSI_TYPE_GROUP: { /* Group */
-				char *gname;
-				char *gname_utf8;
-
-				gname = curitem->name;
-				gname_utf8 = oscar_utf8_try_convert(account, od, gname);
-
-				if (gname_utf8 != NULL && purple_find_group(gname_utf8) == NULL) {
-					g = purple_group_new(gname_utf8);
+				if (curitem->name != NULL && purple_find_group(curitem->name) == NULL) {
+					g = purple_group_new(curitem->name);
 					purple_blist_add_group(g, NULL);
 				}
-				g_free(gname_utf8);
 			} break;
 
 			case AIM_SSI_TYPE_PERMIT: { /* Permit buddy (unless we're on ICQ) */