/pidgin/main: e8542f42dd97: Facebook XMPP: perform roster cleanu...

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed May 7 11:11:53 EDT 2014


Changeset: e8542f42dd9746a60eeb28a21934f8d5e5feeb62
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-05-07 17:11 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/e8542f42dd97

Description:

Facebook XMPP: perform roster cleanup only once

diffstat:

 libpurple/protocols/jabber/facebook_roster.c |  4 ++++
 libpurple/protocols/jabber/jabber.h          |  3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diffs (27 lines):

diff --git a/libpurple/protocols/jabber/facebook_roster.c b/libpurple/protocols/jabber/facebook_roster.c
--- a/libpurple/protocols/jabber/facebook_roster.c
+++ b/libpurple/protocols/jabber/facebook_roster.c
@@ -37,6 +37,10 @@ jabber_facebook_roster_cleanup(JabberStr
 	PurpleBuddy *buddy;
 	const gchar *jid;
 
+	if (js->facebook_roster_cleanup_performed)
+		return;
+	js->facebook_roster_cleanup_performed = TRUE;
+
 	/* mark all local buddies as "to be removed" */
 	remove_buddies = g_hash_table_new_full(g_str_hash, g_str_equal,
 		g_free, NULL);
diff --git a/libpurple/protocols/jabber/jabber.h b/libpurple/protocols/jabber/jabber.h
--- a/libpurple/protocols/jabber/jabber.h
+++ b/libpurple/protocols/jabber/jabber.h
@@ -284,6 +284,9 @@ struct _JabberStream
 	gchar *google_relay_host;
 	GList *google_relay_requests; /* the HTTP requests to get */
 												/* relay info */
+
+	/* facebook quirks */
+	gboolean facebook_roster_cleanup_performed;
 };
 
 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *namespace);



More information about the Commits mailing list