diff libpurple/protocols/jabber/jabber.h @ 23705:9bf36aad8735

We talked about this and decided it was probably cleaner to not use a static variable here.
author Mark Doliner <mark@kingant.net>
date Wed, 06 Aug 2008 09:27:06 +0000
parents 224169be5830
children 3c3032be12de 4bc74deeb503
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.h	Wed Aug 06 07:03:37 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.h	Wed Aug 06 09:27:06 2008 +0000
@@ -108,6 +108,37 @@
 	GHashTable *buddies;
 	gboolean roster_parsed;
 
+	/*
+	 * This boolean was added to eliminate a heinous bug where we would
+	 * get into a loop with the server and move a buddy back and forth
+	 * from one group to another.
+	 *
+	 * The sequence goes something like this:
+	 * 1. Our resource and another resource both approve an authorization
+	 *    request at the exact same time.  We put the buddy in group A and
+	 *    the other resource put the buddy in group B.
+	 * 2. The server receives the roster add for group B and sends us a
+	 *    roster push.
+	 * 3. We receive this roster push and modify our local blist.  This
+	 *    triggers us to send a roster add for group B.
+	 * 4. The server recieves our earlier roster add for group A and sends
+	 *    us a roster push.
+	 * 5. We receive this roster push and modify our local blist.  This
+	 *    triggers us to send a roster add for group A.
+	 * 6. The server receives our earlier roster add for group B and sends
+	 *    us a roster push.
+	 * (repeat steps 3 through 6 ad infinitum)
+	 *
+	 * This boolean is used to short-circuit the sending of a roster add
+	 * when we receive a roster push.
+	 *
+	 * See these bug reports:
+	 * http://trac.adiumx.com/ticket/8834
+	 * http://developer.pidgin.im/ticket/5484
+	 * http://developer.pidgin.im/ticket/6188
+	 */
+	gboolean currently_parsing_roster_push;
+
 	GHashTable *chats;
 	GList *chat_servers;
 	PurpleRoomlist *roomlist;