pidgin: 3de680ff: When a jabber identity is added or remov...

evands at pidgin.im evands at pidgin.im
Sun Feb 20 20:36:07 EST 2011


----------------------------------------------------------------------
Revision: 3de680fff7ddd1b00149657afb7f6cd833000a90
Parent:   907ec8e47d3024d0ae697d1142192dfa7d9d9cf4
Author:   evands at pidgin.im
Date:     02/20/11 19:17:36
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3de680fff7ddd1b00149657afb7f6cd833000a90

Changelog: 

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

Changes against parent 907ec8e47d3024d0ae697d1142192dfa7d9d9cf4

  patched  libpurple/protocols/jabber/jabber.c

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	ad50987594a75a4e32625b8192cb0ab9412e310a
+++ libpurple/protocols/jabber/jabber.c	ad77fd3a71a070f9d823e30bca88076aea1f2f8c
@@ -1984,6 +1984,10 @@ void jabber_add_feature(const char *name
 	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 @@ void jabber_add_identity(const gchar *ca
 	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)


More information about the Commits mailing list