]> andersk Git - libfaim.git/blobdiff - aim_chat.c
- Thu Aug 31 23:40:23 UTC 2000
[libfaim.git] / aim_chat.c
index ab49d1205dc869d25641ad2c5f47bbd411891da9..765e19dcd69031a8d6a8edea621f5f5ee38dfec4 100644 (file)
@@ -70,6 +70,8 @@ u_long aim_chat_send_im(struct aim_session_t *sess,
   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.
@@ -430,11 +432,13 @@ int aim_chat_parse_incoming(struct aim_session_t *sess,
   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
    *
@@ -579,6 +583,7 @@ u_long aim_chat_invite(struct aim_session_t *sess,
    */
   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)
This page took 0.031553 seconds and 4 git commands to generate.