im.pidgin.pidgin: 1d6b24ed027c253dbe63f69d5e40b43cd7faf436

elb at pidgin.im elb at pidgin.im
Tue Dec 4 15:37:06 EST 2007


-----------------------------------------------------------------
Revision: 1d6b24ed027c253dbe63f69d5e40b43cd7faf436
Ancestor: 5dc4cf40c038206bcf06fe7407e1e308b0264e32
Author: elb at pidgin.im
Date: 2007-12-04T20:27:06
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/irc/irc.c libpurple/protocols/irc/irc.h
        libpurple/protocols/irc/msgs.c

ChangeLog: 

Do not allow ISON requests to stack in IRC

-------------- next part --------------
============================================================
--- libpurple/protocols/irc/irc.c	86a76691fd3b5732f3b8ee2fb2225ed840852304
+++ libpurple/protocols/irc/irc.c	a54326ee583fcd7b7cfe461cc96eff8003dc50f3
@@ -184,9 +184,14 @@ gboolean irc_blist_timeout(struct irc_co
 /* XXX I don't like messing directly with these buddies */
 gboolean irc_blist_timeout(struct irc_conn *irc)
 {
-	GString *string = g_string_sized_new(512);
+	GString *string;
 	char *list, *buf;
 
+	if (irc->ison_outstanding)
+		return TRUE;
+
+	string = g_string_sized_new(512);
+
 	g_hash_table_foreach(irc->buddies, (GHFunc)irc_buddy_append, (gpointer)string);
 
 	list = g_string_free(string, FALSE);
@@ -200,6 +205,8 @@ gboolean irc_blist_timeout(struct irc_co
 	irc_send(irc, buf);
 	g_free(buf);
 
+	irc->ison_outstanding = TRUE;
+
 	return TRUE;
 }
 
============================================================
--- libpurple/protocols/irc/irc.h	902fb8f09c5da6aaf12d0bfe6bd0db208dcdd93a
+++ libpurple/protocols/irc/irc.h	49082663654368df5b303822ac5bc8627e3bcd05
@@ -56,6 +56,8 @@ struct irc_conn {
 	guint timer;
 	GHashTable *buddies;
 
+	gboolean ison_outstanding;
+
 	char *inbuf;
 	int inbuflen;
 	int inbufused;
============================================================
--- libpurple/protocols/irc/msgs.c	64329da89fff1ffa6fa21a88acea88d319beb88f
+++ libpurple/protocols/irc/msgs.c	37fdc7040037099b9ca7ec8d1017b3426caccbd6
@@ -707,6 +707,7 @@ void irc_msg_ison(struct irc_conn *irc, 
 	g_strfreev(nicks);
 
 	g_hash_table_foreach(irc->buddies, (GHFunc)irc_buddy_status, (gpointer)irc);
+	irc->ison_outstanding = FALSE;
 }
 
 static void irc_buddy_status(char *name, struct irc_buddy *ib, struct irc_conn *irc)


More information about the Commits mailing list