+int aim_parse_msgack_middle(struct aim_session_t *sess, struct command_rx_struct *command)
+{
+ rxcallback_t userfunc = NULL;
+ char sn[MAXSNLEN];
+ unsigned short type;
+ int i = 10+8; /* skip SNAC and cookie */
+ int ret = 1;
+ unsigned char snlen;
+
+ type = aimutil_get16(command->data+i);
+ i += 2;
+
+ snlen = aimutil_get8(command->data+i);
+ i++;
+
+ memset(sn, 0, sizeof(sn));
+ strncpy(sn, command->data+i, snlen);
+
+ if ((userfunc = aim_callhandler(command->conn, 0x0004, 0x000c)))
+ ret = userfunc(sess, command, type, sn);
+
+ return ret;
+}
+
+int aim_parse_ratechange_middle(struct aim_session_t *sess, struct command_rx_struct *command)
+{
+ rxcallback_t userfunc = NULL;
+ int i = 10; /* skip SNAC */
+ int ret = 1;
+ unsigned long newrate;
+
+ if (command->commandlen != 0x2f) {
+ printf("faim: unknown rate change length 0x%04x\n", command->commandlen);
+ return 1;
+ }
+
+ newrate = aimutil_get32(command->data+34);
+
+ if ((userfunc = aim_callhandler(command->conn, 0x0001, 0x000a)))
+ ret = userfunc(sess, command, newrate);
+
+ return ret;
+}
+