pidgin: 71959eaf: jabber: Remove useless jabber_normalize ...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Thu Oct 15 21:31:55 EDT 2009


-----------------------------------------------------------------
Revision: 71959eaf5a1ba3ff50476035a3b4ac013ff42cbc
Ancestor: 0d319bbd23fdd7e6cf2065b21e92612657c6e8cb
Author: darkrain42 at pidgin.im
Date: 2009-10-15T16:25:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/71959eaf5a1ba3ff50476035a3b4ac013ff42cbc

Modified files:
        libpurple/protocols/jabber/chat.c
        libpurple/protocols/jabber/chat.h

ChangeLog: 

jabber: Remove useless jabber_normalize calls now that the data in the hash table
is normalized.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/chat.c	af3f1e26f0c632a65beff430f742808ff6b03172
+++ libpurple/protocols/jabber/chat.c	ed7efb85279890a982ef439aefe67d0b10594fde
@@ -106,7 +106,7 @@ JabberChat *jabber_chat_find(JabberStrea
 	{
 		char *room_jid = g_strdup_printf("%s@%s", room, server);
 
-		chat = g_hash_table_lookup(js->chats, jabber_normalize(NULL, room_jid));
+		chat = g_hash_table_lookup(js->chats, room_jid);
 		g_free(room_jid);
 	}
 
@@ -373,7 +373,7 @@ void jabber_chat_destroy(JabberChat *cha
 	JabberStream *js = chat->js;
 	char *room_jid = g_strdup_printf("%s@%s", chat->room, chat->server);
 
-	g_hash_table_remove(js->chats, jabber_normalize(NULL, room_jid));
+	g_hash_table_remove(js->chats, room_jid);
 	g_free(room_jid);
 }
 
============================================================
--- libpurple/protocols/jabber/chat.h	1297d74d3b11a2cd54a56943bea27859f1413adf
+++ libpurple/protocols/jabber/chat.h	fe8301dfd06b6335f245538f6796b527c0eeaf04
@@ -62,6 +62,8 @@ char *jabber_get_chat_name(GHashTable *d
  * in-prpl function for joining a chat room. Doesn't require sticking goop
  * into a hash table.
  *
+ * @param room     The room to join. This MUST be normalized already.
+ * @param server   The server the room is on. This MUST be normalized already.
  * @param password The password (if required) to join the room. May be NULL.
  * @param data     The chat hash table.  May be NULL (it will be generated
  *                 for current core<>prpl API interface.)


More information about the Commits mailing list