Mercurial > pidgin.yaz
diff libpurple/protocols/oscar/oscar_data.c @ 23621:a73d527731ff
To decrease the odds of hitting the rate limit ceiling rapidly on a
buddy list with a large number of ICQ buddies, space out our requests
for the ICQ Status Note. This has 2 beneficial effects:
1. Request notes over a longer period of time, avoiding hitting the rate
limit immediately.
2. Coalesce multiple requests for the same note into a single request.
Previously, we were making n*2 to n*4 requests, where n is the number
of ICQ contacts with status notes, at signon, as purple_parse_oncoming
is called multiple times for each one.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Sun, 20 Jul 2008 22:19:10 +0000 |
parents | 1728c7414856 |
children | a270bd4b5298 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar_data.c Sun Jul 20 05:53:00 2008 +0000 +++ b/libpurple/protocols/oscar/oscar_data.c Sun Jul 20 22:19:10 2008 +0000 @@ -92,6 +92,14 @@ od->requesticon = g_slist_remove(od->requesticon, sn); g_free(sn); } + while (od->statusnotes_queue) + { + gchar *sn = od->statusnotes_queue->data; + od->statusnotes_queue = g_slist_remove(od->statusnotes_queue, sn); + g_free(sn); + } + if (od->statusnotes_queue_timer) + purple_timeout_remove(od->statusnotes_queue_timer); g_free(od->email); g_free(od->newp); g_free(od->oldp);