From: <the...@us...> - 2006-12-05 06:23:47
|
Revision: 17896 http://svn.sourceforge.net/gaim/?rev=17896&view=rev Author: thekingant Date: 2006-12-04 22:23:43 -0800 (Mon, 04 Dec 2006) Log Message: ----------- 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. Modified Paths: -------------- trunk/libgaim/protocols/oscar/family_locate.c trunk/libgaim/protocols/oscar/flap_connection.c Modified: trunk/libgaim/protocols/oscar/family_locate.c =================================================================== --- trunk/libgaim/protocols/oscar/family_locate.c 2006-12-04 21:56:32 UTC (rev 17895) +++ trunk/libgaim/protocols/oscar/family_locate.c 2006-12-05 06:23:43 UTC (rev 17896) @@ -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); } Modified: trunk/libgaim/protocols/oscar/flap_connection.c =================================================================== --- trunk/libgaim/protocols/oscar/flap_connection.c 2006-12-04 21:56:32 UTC (rev 17895) +++ trunk/libgaim/protocols/oscar/flap_connection.c 2006-12-05 06:23:43 UTC (rev 17896) @@ -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) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |