pidgin: 88c7f87f: Shift several rate-limiting-costly ICQ i...

evands at pidgin.im evands at pidgin.im
Sun Jul 20 21:25:45 EDT 2008


-----------------------------------------------------------------
Revision: 88c7f87fb5a74f975cf06c472059ecf081c54042
Ancestor: 94615bf7b3bc4cd6c88bc68018c49286a1058e93
Author: evands at pidgin.im
Date: 2008-07-20T22:21:27
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/88c7f87fb5a74f975cf06c472059ecf081c54042

Modified files:
        libpurple/protocols/oscar/family_icq.c

ChangeLog: 

Shift several rate-limiting-costly ICQ info requests to be low priority
so they can't interfere with messaging when performed on a large
number of contacts while we are rate limited or nearly rate limited.

Also, added debug logging to note when offline messages are requested
and acknowledged and when the ICQ alias is requested.

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/family_icq.c	13e35ab10874b0bc607b81c49fb99130394c4c47
+++ libpurple/protocols/oscar/family_icq.c	ed9f7cc160df7bc93538a8279d9ce89315756f89
@@ -36,6 +36,8 @@ int aim_icq_reqofflinemsgs(OscarData *od
 	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
+	purple_debug_info("oscar", "Requesting offline messages from %s", od->sn);
+
 	bslen = 2 + 4 + 2 + 2;
 
 	byte_stream_new(&bs, 4 + bslen);
@@ -68,6 +70,8 @@ int aim_icq_ackofflinemsgs(OscarData *od
 	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
+	purple_debug_info("oscar", "Acknowledged receipt of offline messages from %s", od->sn);
+
 	bslen = 2 + 4 + 2 + 2;
 
 	byte_stream_new(&bs, 4 + bslen);
@@ -242,6 +246,8 @@ int aim_icq_getalias(OscarData *od, cons
 	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
+	purple_debug_info("oscar", "Requesting ICQ alias for %s", uin);
+
 	bslen = 2 + 4 + 2 + 2 + 2 + 4;
 
 	byte_stream_new(&bs, 4 + bslen);
@@ -259,7 +265,7 @@ int aim_icq_getalias(OscarData *od, cons
 	byte_stream_putle16(&bs, 0x04ba); /* shrug. */
 	byte_stream_putle32(&bs, atoi(uin));
 
-	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac_with_priority(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs, /* High priority? */ FALSE);
 
 	byte_stream_destroy(&bs);
 
@@ -303,7 +309,7 @@ int aim_icq_getsimpleinfo(OscarData *od,
 	byte_stream_putle16(&bs, 0x051f); /* shrug. */
 	byte_stream_putle32(&bs, atoi(uin));
 
-	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac_with_priority(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs, /* High priority? */ FALSE);
 
 	byte_stream_destroy(&bs);
 
@@ -877,7 +883,7 @@ icqresponse(OscarData *od, FlapConnectio
 				info->next = od->icq_info;
 				od->icq_info = info;
 
-				flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+				flap_connection_send_snac_with_priority(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs, /* High priority? */ FALSE);
 
 				byte_stream_destroy(&bs);
 			}


More information about the Commits mailing list