adium: 4bb0587b: If the features or identities list chang...

evands at pidgin.im evands at pidgin.im
Sun Sep 19 17:45:47 EDT 2010


----------------------------------------------------------------------
Revision: 4bb0587b181457c9971826f9a448bdbcdab4a9cf
Parent:   72a1ab897368e57934b7b5d2e58e897e679efabe
Author:   evands at pidgin.im
Date:     09/19/10 17:37:08
Branch:   im.pidgin.adium
URL: http://d.pidgin.im/viewmtn/revision/info/4bb0587b181457c9971826f9a448bdbcdab4a9cf

Changelog: 

If the features or identities list changes for a JabberStream, the caps_hash is no longer correct. Force it to be recalculated (lazily) next it is needed. Fixes #a14273

Changes against parent 72a1ab897368e57934b7b5d2e58e897e679efabe

  patched  libpurple/protocols/jabber/jabber.c

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	f4de9f9146812cca9194ceff2eeb1fa53ff63c8a
+++ libpurple/protocols/jabber/jabber.c	d3980d20af7f335418e7ffa8bb37d07ad4ca7f4d
@@ -1960,6 +1960,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) {
@@ -2041,6 +2045,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