# HG changeset patch # User Evan Schoenberg # Date 1298247456 0 # Node ID b678afdc2b8f9c72691df71bdf1fdf777b9ac2dc # Parent 58d9bcd75866effaf964b8b843b03e56baad8cff When a jabber identity is added or removed, the caps_hash that would be created changes; uncache it so that it is recalculated as appropriate. applied changes from 72a1ab897368e57934b7b5d2e58e897e679efabe through 4bb0587b181457c9971826f9a448bdbcdab4a9cf diff -r 58d9bcd75866 -r b678afdc2b8f libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sun Feb 20 18:21:47 2011 +0000 +++ b/libpurple/protocols/jabber/jabber.c Mon Feb 21 00:17:36 2011 +0000 @@ -1984,6 +1984,10 @@ 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) { @@ -2065,6 +2069,10 @@ 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)