From: mid Date: Fri, 15 Dec 2000 20:44:40 +0000 (+0000) Subject: - Fri Dec 15 20:41:15 UTC 2000 X-Git-Tag: rel_0_99_2~82 X-Git-Url: http://andersk.mit.edu/gitweb/libfaim.git/commitdiff_plain/3e2c7bcfd0f176bf1bb5726dcf61d85b32dc72b2 - Fri Dec 15 20:41:15 UTC 2000 - Revise README - Make aimdebugd compile - Typos --- diff --git a/CHANGES b/CHANGES index d85c915..53311f4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ No release numbers ------------------ + - Fri Dec 15 20:41:15 UTC 2000 + - Revise README + - Make aimdebugd compile + - Typos + - Fri Dec 15 02:04:12 UTC 2000 - Parse rate changes *properly* - Add sample code to faimtest demonstrating my approximations diff --git a/README b/README index 30a067f..c42d1bb 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ libfaim pre-0.90 or so This is libfaim, the purpose of which is to implement as much as the AOL AIM/OSCAR protocol as possible (which should be all of it). After -over a year of development, its still nowhere close. +over two years of development, its still nowhere close. This is not a full client and never will be. libfaim only implements the routines to implement a client (ie, there's no user interface). @@ -16,7 +16,11 @@ I would not recommend using this version of libfaim in any form yet. It's beta-quality and I know it leaks memory quite badly. It seems fairly stable, however. YMMV, YAYOR, etc. I suppose I should say regardless of that warning, that several clients use it and people use those clients -on a daily basis (in particular, me). +on a daily basis (in particular, me). Also, you're probably reading this +from a CVS version, since I haven't made a release in a very long time. +The CVS version changes fairly rapidly when I'm in the mood, so a version +you checked out an hour ago may be better or worse than a version you +check out now. Building diff --git a/aim_rxhandlers.c b/aim_rxhandlers.c index 55a00d5..c0a8c72 100644 --- a/aim_rxhandlers.c +++ b/aim_rxhandlers.c @@ -480,7 +480,7 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess) workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, AIM_CB_FAM_BUD, AIM_CB_BUD_DEFAULT, workingPtr); } break; - case 0x0004: /* Family: Messeging */ + case 0x0004: /* Family: Messaging */ switch (subtype) { case 0x0001: workingPtr->handled = aim_parse_msgerror_middle(sess, workingPtr); @@ -533,6 +533,10 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess) workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, AIM_CB_FAM_STS, AIM_CB_STS_DEFAULT, workingPtr); break; } + case 0x0013: { + printf("lalala: 0x%04x/0x%04x\n", family, subtype); + break; + } case AIM_CB_FAM_SPECIAL: workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, family, subtype, workingPtr); break; diff --git a/utils/aimdebugd/aimdebugd.c b/utils/aimdebugd/aimdebugd.c index 1779a4d..6245b3f 100644 --- a/utils/aimdebugd/aimdebugd.c +++ b/utils/aimdebugd/aimdebugd.c @@ -83,13 +83,15 @@ int debugconn_connect(struct aim_session_t *sess, struct command_rx_struct *comm int parsescriptline(struct aim_session_t *sess, struct aim_conn_t **conn); /* file.c */ int handlechild(int fd, char *scriptname) -{ - int stayalive = 1, selstat; +{ + int alive; + int selstat; client_t client; struct aim_conn_t *inconn, *waitingconn; - aim_session_init(&client.sess); - + aim_session_init(&client.sess, 0); + //client.sess.tx_enqueue = aim_tx_enqueue__immediate; + if (!(inconn = aim_newconn(&client.sess, AIM_CONN_TYPE_BOS, NULL))) { printf(RUNPREFIX "unable to allocate client structures\n"); exit(-1); @@ -111,12 +113,13 @@ int handlechild(int fd, char *scriptname) aim_debugconn_sendconnect(&client.sess, inconn); - while (stayalive) { + alive = 1; + while (alive) { waitingconn = aim_select(&client.sess, NULL, &selstat); switch(selstat) { case -1: /* error */ - stayalive = 0; /* fall through and hit aim_logoff() */ + alive = 0; /* fall through and hit aim_logoff() */ break; case 0: /* nothing pending */ break; @@ -127,13 +130,13 @@ int handlechild(int fd, char *scriptname) if (waitingconn->fd == scriptfd) { if (clientready) { if (parsescriptline(&client.sess, &waitingconn) < 0) { - stayalive = 0; + alive = 0; } } } else { if (aim_get_command(&client.sess, waitingconn) < 0) { printf(RUNPREFIX "connection error\n"); - stayalive = 0; /* fall through to aim_logoff() */ + alive = 0; /* fall through to aim_logoff() */ } else { aim_rxdispatch(&client.sess); } @@ -146,6 +149,7 @@ int handlechild(int fd, char *scriptname) printf(RUNPREFIX "client disconnected\n"); + close(fd); aim_logoff(&client.sess); return fd; diff --git a/utils/aimdebugd/icbm.c b/utils/aimdebugd/icbm.c index db42969..6835cef 100644 --- a/utils/aimdebugd/icbm.c +++ b/utils/aimdebugd/icbm.c @@ -71,7 +71,7 @@ int sendimtoclient(struct aim_session_t *sess, struct aim_conn_t *conn, i += aimutil_put16(tx->data+i, 0x0000); /* class */ - aim_addtlvtochain16(&tlvlist, 0x0001, AIM_CLASS_FREE | AIM_CLASS_TRIAL); + aim_addtlvtochain16(&tlvlist, 0x0001, AIM_FLAG_FREE | AIM_FLAG_UNCONFIRMED); /* member-since date */ aim_addtlvtochain32(&tlvlist, 0x0002, 0);