From: mid Date: Wed, 28 Mar 2001 03:20:40 +0000 (+0000) Subject: - Tue Mar 27 19:15:10 PST 2001 X-Git-Tag: rel_0_99_2~54 X-Git-Url: http://andersk.mit.edu/gitweb/libfaim.git/commitdiff_plain/d32954e7c6dedab32fc72c6f2f301a8530fd36cc - Tue Mar 27 19:15:10 PST 2001 - I haven't decided yet whether today is a good day or a bad day. - Probably both. - More later. --- diff --git a/CHANGES b/CHANGES index c5fd6ba..bc2bec7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ No release numbers ------------------ + - Tue Mar 27 19:15:10 PST 2001 + - I haven't decided yet whether today is a good day or a bad day. + - Probably both. + - More later. + - Mon Mar 26 16:08:45 PST 2001 - Why didn't anyone tell me buddy-offgoing wasn't working? - *** REQUIRES CLIENT CHANGES... buddy-offgoing now passes a userinfo diff --git a/src/bos.c b/src/bos.c index 247251e..245b3bc 100644 --- a/src/bos.c +++ b/src/bos.c @@ -35,11 +35,11 @@ faim_export int aim_0001_0020(struct aim_session_t *sess, struct aim_conn_t *con /* Hummm.... */ i = aim_putsnac(tx->data, 0x0001, 0x0020, 0x0000, sess->snac_nextid++); i += aimutil_put16(tx->data+i, 0x0010); - i += aimutil_put32(tx->data+i, 0x469bf5e7); - i += aimutil_put32(tx->data+i, 0x01a19b28); - i += aimutil_put32(tx->data+i, 0x54c59ea6); - i += aimutil_put32(tx->data+i, 0x88eae54a); - + i += aimutil_put32(tx->data+i, 0x92bd6757); + i += aimutil_put32(tx->data+i, 0x3722cbd3); + i += aimutil_put32(tx->data+i, 0x2b048ab9); + i += aimutil_put32(tx->data+i, 0xd0b1e4ab); + tx->commandlen = i; tx->lock = 0; aim_tx_enqueue(sess, tx); diff --git a/src/login.c b/src/login.c index 37fe042..748823f 100644 --- a/src/login.c +++ b/src/login.c @@ -146,6 +146,25 @@ faim_export int aim_request_login(struct aim_session_t *sess, * build = 0x0686 * unknown =0x0000002a * + * Java AIM 1.1.19: + * clientstring = "AOL Instant Messenger (TM) version 1.1.19 for Java built 03/24/98, freeMem 215871 totalMem 1048567, i686, Linus, #2 SMP Sun Feb 11 03:41:17 UTC 2001 2.4.1-ac9, IBM Corporation, 1.1.8, 45.3, Tue Mar 27 12:09:17 PST 2001" + * major2 = 0x0001 + * major = 0x0001 + * minor = 0x0001 + * minor2 = (not sent) + * build = 0x0013 + * unknown= (not sent) + * + * AIM for Linux 1.1.112: + * clientstring = "AOL Instant Messenger (SM)" + * major2 = 0x1d09 + * major = 0x0001 + * minor = 0x0001 + * minor2 = 0x0001 + * build = 0x0070 + * unknown= 0x0000008b + * serverstore = 0x01 + * */ faim_export int aim_send_login (struct aim_session_t *sess, struct aim_conn_t *conn, @@ -645,6 +664,15 @@ static int hostversions(struct aim_session_t *sess, aim_module_t *mod, struct co return 0; } +/* + * Stay tuned. I have an explanation for here. + * + * + */ +static int memrequest(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen) +{ + return 1; +} static int snachandler(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen) { @@ -665,6 +693,8 @@ static int snachandler(struct aim_session_t *sess, aim_module_t *mod, struct com return motd(sess, mod, rx, snac, data, datalen); else if (snac->subtype == 0x0018) return hostversions(sess, mod, rx, snac, data, datalen); + else if (snac->subtype == 0x001f) + return memrequest(sess, mod, rx, snac, data, datalen); return 0; } diff --git a/utils/faimtest/faimtest.c b/utils/faimtest/faimtest.c index 44276c5..76fc179 100644 --- a/utils/faimtest/faimtest.c +++ b/utils/faimtest/faimtest.c @@ -319,6 +319,8 @@ int main(int argc, char **argv) int i; int selstat = 0; static int faimtest_mode = 0; + struct timeval tv; + time_t lastnop = 0; screenname = getenv("SCREENNAME"); password = getenv("PASSWORD"); @@ -398,12 +400,22 @@ int main(int argc, char **argv) } while (keepgoing) { - waitingconn = aim_select(&aimsess, NULL, &selstat); + + tv.tv_sec = 5; + tv.tv_usec = 0; + + waitingconn = aim_select(&aimsess, &tv, &selstat); + + if (connected && ((time(NULL) - lastnop) > 30)) { + lastnop = time(NULL); + dprintf("sending NOP\n"); + aim_flap_nop(&aimsess, aim_getconn_type(&aimsess, AIM_CONN_TYPE_BOS)); + } if (selstat == -1) { /* error */ keepgoing = 0; /* fall through */ } else if (selstat == 0) { /* no events pending */ - keepgoing = 0; + ; } else if (selstat == 1) { /* outgoing data pending */ aim_tx_flushqueue(&aimsess); } else if (selstat == 2) { /* incoming data pending */ @@ -881,7 +893,7 @@ int faimtest_parse_authresp(struct aim_session_t *sess, struct command_rx_struct aim_conn_addhandler(sess, bosconn, 0x0009, 0x0001, faimtest_parse_genericerr, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNERR, faimtest_parse_connerr, 0); - + aim_conn_addhandler(sess, bosconn, 0xffff, 0xffff, faimtest_parse_unknown, 0); aim_auth_sendcookie(sess, bosconn, cookie); @@ -1807,6 +1819,8 @@ int faimtest_parse_connerr(struct aim_session_t *sess, struct command_rx_struct dvprintf("faimtest: connerr: Code 0x%04x: %s\n", code, msg); aim_conn_kill(sess, &command->conn); /* this will break the main loop */ + connected = 0; + return 1; }