]> andersk Git - libfaim.git/commitdiff
- Sat Aug 25 19:19:16 PDT 2001
authormid <mid>
Sun, 26 Aug 2001 02:29:00 +0000 (02:29 +0000)
committermid <mid>
Sun, 26 Aug 2001 02:29:00 +0000 (02:29 +0000)
  - 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
src/im.c
utils/faimtest/faimtest.c

diff --git a/CHANGES b/CHANGES
index fd46f0d3f62b629c26c3f600c30e97bd8f982318..aa6fc3870b0b41efa3018a1ca8cb3b2f6b419b88 100644 (file)
--- 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
index af771faf72564b447293b791ded029e58dc6d39d..b2f39cdff52243b18bc390770ddc81f3921db207 100644 (file)
--- 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)
index 91bb63d5826caef4e6318565564d71fe522a5b59..28dffa39214c0f2b1e6e57e446f777017e0de981 100644 (file)
@@ -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, (reason<missedreasonslen)?missedreasons[reason]:"unknown");
+       dvprintf("faimtest: missed %d messages from %s on channel %d (reason %d: %s)\n", nummissed, userinfo->sn, chan, reason, (reason<missedreasonslen)?missedreasons[reason]:"unknown");
 
        return 1;
 }
This page took 0.064354 seconds and 5 git commands to generate.