# HG changeset patch # User Mark Doliner # Date 1165299823 0 # Node ID 6cc89a43bf8fa70103df060f2e67051ed2706131 # Parent 699e4c6c9d143075741eb41717d963234a04036a [gaim-migrate @ 17896] Lower the away-message fetching timeout from 10 seconds to half a second. The rate limiting stuff will hopefully kick in if needed. Let me know if you have problems. Like rate-related error messages or GUI components not redrawing. committer: Tailor Script diff -r 699e4c6c9d14 -r 6cc89a43bf8f libgaim/protocols/oscar/family_locate.c --- a/libgaim/protocols/oscar/family_locate.c Mon Dec 04 21:56:32 2006 +0000 +++ b/libgaim/protocols/oscar/family_locate.c Tue Dec 05 06:23:43 2006 +0000 @@ -393,7 +393,7 @@ * requesting away messages and info too quickly. */ if (od->getinfotimer == 0) - od->getinfotimer = gaim_timeout_add(10000, + od->getinfotimer = gaim_timeout_add(500, gaim_reqinfo_timeout_cb, od); } diff -r 699e4c6c9d14 -r 6cc89a43bf8f libgaim/protocols/oscar/flap_connection.c --- a/libgaim/protocols/oscar/flap_connection.c Mon Dec 04 21:56:32 2006 +0000 +++ b/libgaim/protocols/oscar/flap_connection.c Tue Dec 05 06:23:43 2006 +0000 @@ -97,11 +97,11 @@ * were to send a SNAC in this rateclass at the given time. */ static guint32 -rateclass_get_new_current(FlapConnection *conn, struct rateclass *rateclass, struct timeval now) +rateclass_get_new_current(FlapConnection *conn, struct rateclass *rateclass, struct timeval *now) { unsigned long timediff; /* In milliseconds */ - timediff = (now.tv_sec - rateclass->last.tv_sec) * 1000 + (now.tv_usec - rateclass->last.tv_usec) / 1000; + timediff = (now->tv_sec - rateclass->last.tv_sec) * 1000 + (now->tv_usec - rateclass->last.tv_usec) / 1000; /* This formula is taken from the joscar API docs. Preesh. */ return MIN(((rateclass->current * (rateclass->windowsize - 1)) + timediff) / rateclass->windowsize, rateclass->max); @@ -127,7 +127,7 @@ { guint32 new_current; - new_current = rateclass_get_new_current(conn, rateclass, now); + new_current = rateclass_get_new_current(conn, rateclass, &now); if (new_current < rateclass->alert) /* Not ready to send this SNAC yet--keep waiting. */ @@ -183,7 +183,7 @@ guint32 new_current; gettimeofday(&now, NULL); - new_current = rateclass_get_new_current(conn, rateclass, now); + new_current = rateclass_get_new_current(conn, rateclass, &now); if (new_current < rateclass->alert) {