Mercurial > pidgin.yaz
changeset 31683:b678afdc2b8f
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
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Mon, 21 Feb 2011 00:17:36 +0000 |
parents | 58d9bcd75866 |
children | c0945d2291b9 9d7b2a7709d5 |
files | libpurple/protocols/jabber/jabber.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)