- aim_cachecookie(sess, aim_mkcookie(newpacket->data+curbyte-8, AIM_COOKIETYPE_CHAT, NULL));
+
+ /* XXX this should get uncached by the unwritten 'invite accept' handler */
+ if(!(priv = calloc(sizeof(struct aim_invite_priv), 1)))
+ return -1;
+ priv->sn = strdup(sn);
+ priv->roomname = strdup(roomname);
+ priv->exchange = exchange;
+ priv->instance = instance;
+
+ if(!(cookie = aim_mkcookie(newpacket->data+curbyte-8, AIM_COOKIETYPE_INVITE, priv)))
+ return -1;
+ aim_cachecookie(sess, cookie);