pidgin: 2a826fe4: Once we've coalesced the ICQ Status Note...
evands at pidgin.im
evands at pidgin.im
Tue Jul 22 10:16:18 EDT 2008
-----------------------------------------------------------------
Revision: 2a826fe4f31060ded309b2d01b02df16038271e9
Ancestor: d1162a26436b062541b1171cadc8522d455069bb
Author: evands at pidgin.im
Date: 2008-07-22T14:13:58
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2a826fe4f31060ded309b2d01b02df16038271e9
Modified files:
libpurple/protocols/oscar/oscar.c
ChangeLog:
Once we've coalesced the ICQ Status Note reqeusts, we can send them
all at once rather than spacing them out. The low priority SNAC setting
will guarantee that even if we become rate limited messages are still
sent in a timely fashion.
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c ebfeebf3a0b4cfb446865c414ed92910a05e6d8e
+++ libpurple/protocols/oscar/oscar.c 5357d06a42c2499c8d29309cdc89574824d72670
@@ -1897,33 +1897,31 @@ static gboolean purple_requesticqstatusn
{
PurpleConnection *gc = data;
OscarData *od = gc->proto_data;
- char *sn;
- struct aim_ssi_item *ssi_item;
- aim_tlv_t *note_hash;
- sn = od->statusnotes_queue->data;
+ while (od->statusnotes_queue != NULL)
+ {
+ char *sn;
+ struct aim_ssi_item *ssi_item;
+ aim_tlv_t *note_hash;
- ssi_item = aim_ssi_itemlist_finditem(od->ssi.local,
- NULL, sn, AIM_SSI_TYPE_BUDDY);
- if (ssi_item != NULL)
- {
- note_hash = aim_tlv_gettlv(ssi_item->data, 0x015c, 1);
- if (note_hash != NULL) {
- aim_icq_getstatusnote(od, sn, note_hash->value, note_hash->length);
+ sn = od->statusnotes_queue->data;
+
+ ssi_item = aim_ssi_itemlist_finditem(od->ssi.local,
+ NULL, sn, AIM_SSI_TYPE_BUDDY);
+ if (ssi_item != NULL)
+ {
+ note_hash = aim_tlv_gettlv(ssi_item->data, 0x015c, 1);
+ if (note_hash != NULL) {
+ aim_icq_getstatusnote(od, sn, note_hash->value, note_hash->length);
+ }
}
- }
- od->statusnotes_queue = g_slist_remove(od->statusnotes_queue, sn);
- g_free(sn);
-
- if (od->statusnotes_queue == NULL)
- {
- purple_debug_misc("oscar", "No more ICQ status notes to request");
- od->statusnotes_queue_timer = 0;
- return FALSE;
+ od->statusnotes_queue = g_slist_remove(od->statusnotes_queue, sn);
+ g_free(sn);
}
- return TRUE;
+ od->statusnotes_queue_timer = 0;
+ return FALSE;
}
@@ -2126,7 +2124,7 @@ static int purple_parse_oncoming(OscarDa
if (od->statusnotes_queue_timer > 0)
purple_timeout_remove(od->statusnotes_queue_timer);
- od->statusnotes_queue_timer = purple_timeout_add_seconds(2,
+ od->statusnotes_queue_timer = purple_timeout_add_seconds(3,
purple_requesticqstatusnote, gc);
}
}
More information about the Commits
mailing list