pidgin: feb6784f: jabber: Use a straight equality check in...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sat Feb 19 21:32:33 EST 2011


----------------------------------------------------------------------
Revision: feb6784f7ddc856836d0ebe8b7d58d5ef6cf9b54
Parent:   d79cb15140c8920bdfba4a1dbe9768c2022644c7
Author:   darkrain42 at pidgin.im
Date:     02/19/11 21:22:03
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/feb6784f7ddc856836d0ebe8b7d58d5ef6cf9b54

Changelog: 

jabber: Use a straight equality check instead of collate

Changes against parent d79cb15140c8920bdfba4a1dbe9768c2022644c7

  patched  libpurple/protocols/jabber/jabber.c
  patched  libpurple/protocols/jabber/presence.c

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	f92a126795409ad9eaca9b2cec4c18194fca5af6
+++ libpurple/protocols/jabber/jabber.c	ad50987594a75a4e32625b8192cb0ab9412e310a
@@ -2619,6 +2619,7 @@ PurpleChat *jabber_find_blist_chat(Purpl
 			if(!(server = g_hash_table_lookup(components, "server")))
 				continue;
 
+			/* FIXME: Collate is wrong in a few cases here; this should be prepped */
 			if(jid->node && jid->domain &&
 					!g_utf8_collate(room, jid->node) && !g_utf8_collate(server, jid->domain)) {
 				jabber_id_free(jid);
============================================================
--- libpurple/protocols/jabber/presence.c	58980b952442018ac09ede1e90c64187c0357eac
+++ libpurple/protocols/jabber/presence.c	3527cbdbf16fd3eb136961cb7245b4196312d465
@@ -661,7 +661,7 @@ handle_presence_chat(JabberStream *js, J
 			return FALSE;
 		}
 
-		is_our_resource = (0 == g_utf8_collate(presence->jid_from->resource, chat->handle));
+		is_our_resource = g_str_equal(presence->jid_from->resource, chat->handle);
 
 		jabber_buddy_remove_resource(presence->jb, presence->jid_from->resource);
 
@@ -691,6 +691,7 @@ handle_presence_chat(JabberStream *js, J
 					if (g_str_equal(presence->jid_from->resource, chat->handle)) {
 						/* Changing our own nickname */
 						g_free(chat->handle);
+						/* TODO: This should be resourceprep'd */
 						chat->handle = g_strdup(nick);
 					}
 


More information about the Commits mailing list