# HG changeset patch # User Daniel Atallah # Date 1269131669 0 # Node ID 4c3cc12c3a6903b50f25bdca8cefc9791cf4d83a # Parent 182b6bc805abbb307d4bcbf775a6cf24736b7f77# Parent eb72ae3357dcbf68366bcb2238570eef5f0f674b merge of '4c978163a43dcf3f47d33ebb76d86d9be5f52a24' and 'fbc5141857873eae0512b7cecad373ea0612207e' diff -r 182b6bc805ab -r 4c3cc12c3a69 libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Sat Mar 20 21:10:57 2010 +0000 +++ b/libpurple/protocols/jabber/presence.c Sun Mar 21 00:34:29 2010 +0000 @@ -670,7 +670,7 @@ if (chat->muc) { if (g_slist_find(presence->chat_info.codes, GINT_TO_POINTER(110))) is_our_resource = TRUE; - + if (g_slist_find(presence->chat_info.codes, GINT_TO_POINTER(301))) { /* XXX: We got banned. YAY! (No GIR, that's bad) */ } @@ -744,15 +744,15 @@ g_free(reason); } - + if (g_slist_find(presence->chat_info.codes, GINT_TO_POINTER(321))) { /* XXX: removed due to an affiliation change */ } - + if (g_slist_find(presence->chat_info.codes, GINT_TO_POINTER(322))) { /* XXX: removed because room is now members-only */ } - + if (g_slist_find(presence->chat_info.codes, GINT_TO_POINTER(332))) { /* XXX: removed due to system shutdown */ } @@ -996,7 +996,7 @@ JabberPresenceHandler *pih; if (child->type != XMLNODE_TYPE_TAG) continue; - + key = g_strdup_printf("%s %s", child->name, xmlnode_get_namespace(child)); pih = g_hash_table_lookup(presence_handlers, key); g_free(key); @@ -1052,11 +1052,15 @@ } out: + while (presence.chat_info.codes) + presence.chat_info.codes = + g_slist_delete_link(presence.chat_info.codes, + presence.chat_info.codes); + + g_free(presence.status); + g_free(presence.vcard_avatar_hash); g_free(presence.nickname); - g_free(presence.status); jabber_id_free(presence.jid_from); - g_free(presence.nickname); - g_free(presence.vcard_avatar_hash); } void jabber_presence_subscription_set(JabberStream *js, const char *who, const char *type)