No release numbers
------------------
+ - Fri Dec 1 23:48:38 UTC 2000
+ - Store exchange along with room name in the great chat hack
+
- Fri Dec 1 22:25:56 UTC 2000
- Fix numerous tiny (but sometimes catastrophic) bugs dealing
with connection death (particularly with chat connections)
i+= aimutil_put16(newpacket->data+i, 2+1+strlen(roomname)+2);
i+= aimutil_put16(newpacket->data+i, exchange);
i+= aimutil_put8(newpacket->data+i, strlen(roomname));
- memcpy(newpacket->data+i, roomname, strlen(roomname));
- i+= strlen(roomname);
- //i+= aimutil_putstr(newpacket->data+i, roomname, strlen(roomname));
- i+= aimutil_put16(newpacket->data+i, 0x0000);
+ i+= aimutil_putstr(newpacket->data+i, roomname, strlen(roomname));
+ i+= aimutil_put16(newpacket->data+i, 0x0000); /* instance? */
/*
* Chat hack.
* redirect!
*
*/
- sess->pendingjoin = (char *)malloc(strlen(roomname)+1);
- strcpy(sess->pendingjoin, roomname);
+ sess->pendingjoin = strdup(roomname);
+ sess->pendingjoinexchange = exchange;
newpacket->lock = 0;
aim_tx_enqueue(sess, newpacket);
sess->queue_outgoing = NULL;
sess->queue_incoming = NULL;
sess->pendingjoin = NULL;
+ sess->pendingjoinexchange = 0;
aim_initsnachash(sess);
+ sess->msgcookies = NULL;
sess->snac_nextid = 0x00000001;
sess->flags = 0;
if (cur->addtime > (time(NULL) - maxage)) {
struct aim_msgcookie_t *remed = NULL;
-#if DEBUG > 1
+#if 1
printf("aimmsgcookie: WARNING purged obsolete message cookie %x%x%x%x %x%x%x%x\n",
cur->cookie[0], cur->cookie[1], cur->cookie[2], cur->cookie[3],
cur->cookie[4], cur->cookie[5], cur->cookie[6], cur->cookie[7]);
*/
userfunc = aim_callhandler(command->conn, 0x0001, 0x0005);
if (userfunc)
- ret = userfunc(sess, command, serviceid, ip, cookie, sess->pendingjoin);
+ ret = userfunc(sess, command, serviceid, ip, cookie, sess->pendingjoin, (int)sess->pendingjoinexchange);
free(sess->pendingjoin);
sess->pendingjoin = NULL;
+ sess->pendingjoinexchange = 0;
}
else
{
* request and the resulting redirect.)
*/
char *pendingjoin;
+ unsigned short pendingjoinexchange;
/*
* Outstanding snac handling
case 0x000e: /* Chat */
{
char *roomname = NULL;
+ int exchange;
struct aim_conn_t *tstconn = NULL;
roomname = va_arg(ap, char *);
+ exchange = va_arg(ap, int);
tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHAT, ip);
if ( (tstconn==NULL) || (tstconn->status & AIM_CONN_STATUS_RESOLVERR))
if (tstconn) aim_conn_kill(sess, &tstconn);
return 1;
}
- printf("faimtest: chat: connected\n");
+ printf("faimtest: chat: connected to %s on exchange %d\n", roomname, exchange);
/*
* We must do this to attach the stored name to the connection!