if (!sess || !conn || !msg)
return 0;
- if (!(newpacket = aim_tx_new(0x0002, conn, 1152)))
+ if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 1152)))
return -1;
newpacket->lock = 1; /* lock struct */
for (i=0;i<8;i++)
curbyte += aimutil_put8(newpacket->data+curbyte, (u_char) random());
+ aim_cachecookie(sess, aim_mkcookie(newpacket->data+curbyte-8, AIM_COOKIETYPE_CHAT, NULL));
+
/*
* metaTLV start. -- i assume this is a metaTLV. it could be the
* channel ID though.
if (!sess || !conn || !roomname)
return 0;
- if (!(newpacket = aim_tx_new(0x0002, conn, 10+9+strlen(roomname)+2)))
+ if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10+9+strlen(roomname)+2)))
return -1;
newpacket->lock = 1;
i = 10; /* skip snac */
/*
- * ICBM Cookie. Ignore it.
+ * ICBM Cookie. Cache it.
*/
for (z=0; z<8; z++,i++)
cookie[z] = command->data[i];
+ aim_cachecookie(sess, aim_mkcookie(cookie, AIM_COOKIETYPE_ICBM, NULL));
+
/*
* Channel ID
*
struct command_tx_struct *newpacket;
int i;
- if (!(newpacket = aim_tx_new(0x0002, conn, 0x20)))
+ if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 0x20)))
return -1;
newpacket->lock = 1;
if (!sess || !conn || !sn || !msg || !roomname)
return 0;
- if (!(newpacket = aim_tx_new(0x0002, conn, 1152+strlen(sn)+strlen(roomname)+strlen(msg))))
+ if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 1152+strlen(sn)+strlen(roomname)+strlen(msg))))
return -1;
newpacket->lock = 1;
*/
for (i=0;i<8;i++)
curbyte += aimutil_put8(newpacket->data+curbyte, (u_char)rand());
+ aim_cachecookie(sess, aim_mkcookie(newpacket->data+curbyte-8, AIM_COOKIETYPE_CHAT, NULL));
/*
* Channel (2)