From 36a61e0d3039e568e40fc62f9c58c8758a54654d Mon Sep 17 00:00:00 2001 From: mid Date: Sun, 26 Aug 2001 02:29:00 +0000 Subject: [PATCH] - Sat Aug 25 19:19:16 PDT 2001 - Keep parsing missed calls for entire packet - This is really easy to test now. Just talk to someone with their minmsginterval set high (like 10seconds or something) --- CHANGES | 5 +++++ src/im.c | 38 ++++++++++++++++---------------------- utils/faimtest/faimtest.c | 10 ++++++++-- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/CHANGES b/CHANGES index fd46f0d..aa6fc38 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ No release numbers ------------------ + - Sat Aug 25 19:19:16 PDT 2001 + - Keep parsing missed calls for entire packet + - This is really easy to test now. Just talk to someone with + their minmsginterval set high (like 10seconds or something) + - Sat Aug 25 18:35:13 PDT 2001 - aim_sendconnack -> aim_sendflapver - Remove addicbmparam. This was identical to aim_seticbmparam diff --git a/src/im.c b/src/im.c index af771fa..b2f39cd 100644 --- a/src/im.c +++ b/src/im.c @@ -1131,37 +1131,31 @@ static int paraminfo(struct aim_session_t *sess, aim_module_t *mod, struct comma static int missedcall(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen) { - int i = 0; + int i, ret = 0; aim_rxcallback_t userfunc; unsigned short channel, nummissed, reason; struct aim_userinfo_s userinfo; + + for (i = 0; i < datalen; ) { - /* - * XXX: supposedly, this entire packet can repeat as many times - * as necessary. Should implement that. - */ + /* Channel ID. */ + channel = aimutil_get16(data+i); + i += 2; - /* - * Channel ID. - */ - channel = aimutil_get16(data+i); - i += 2; + /* Extract the standard user info block. */ + i += aim_extractuserinfo(sess, data+i, &userinfo); - /* - * Extract the standard user info block. - */ - i += aim_extractuserinfo(sess, data+i, &userinfo); - - nummissed = aimutil_get16(data+i); - i += 2; + nummissed = aimutil_get16(data+i); + i += 2; - reason = aimutil_get16(data+i); - i += 2; + reason = aimutil_get16(data+i); + i += 2; - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, channel, &userinfo, nummissed, reason); + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + ret = userfunc(sess, rx, channel, &userinfo, nummissed, reason); + } - return 0; + return ret; } static int msgack(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen) diff --git a/utils/faimtest/faimtest.c b/utils/faimtest/faimtest.c index 91bb63d..28dffa3 100644 --- a/utils/faimtest/faimtest.c +++ b/utils/faimtest/faimtest.c @@ -570,8 +570,14 @@ static int faimtest_icbmparaminfo(struct aim_session_t *sess, struct command_rx_ dvprintf("ICBM Parameters: maxchannel = %d, default flags = 0x%08lx, max msg len = %d, max sender evil = %f, max reciever evil = %f, min msg interval = %ld\n", params->maxchan, params->flags, params->maxmsglen, ((float)params->maxsenderwarn)/10.0, ((float)params->maxrecverwarn)/10.0, params->minmsginterval); + /* + * Set these to your taste, or client medium. Setting minmsginterval + * higher is good for keeping yourself from getting flooded (esp + * if you're on a slow connection or something where that would be + * useful). + */ params->maxmsglen = 8000; - params->minmsginterval = 0; + params->minmsginterval = 0; /* in milliseconds */ aim_seticbmparam(sess, command->conn, params); @@ -1905,7 +1911,7 @@ int faimtest_parse_misses(struct aim_session_t *sess, struct command_rx_struct * reason = va_arg(ap, int); va_end(ap); - dvprintf("faimtest: missed %d messages from %s (reason %d: %s)\n", nummissed, userinfo->sn, reason, (reasonsn, chan, reason, (reason