X-Git-Url: http://andersk.mit.edu/gitweb/libfaim.git/blobdiff_plain/06bc8607f1e3a6ba570f2c7e686c025a2e29860e..0589dc540706ddf1615d9085f2a68df227509ee6:/utils/faimtest/faimtest.c?ds=inline diff --git a/utils/faimtest/faimtest.c b/utils/faimtest/faimtest.c index fc0acaf..04e3110 100644 --- a/utils/faimtest/faimtest.c +++ b/utils/faimtest/faimtest.c @@ -88,6 +88,7 @@ int faimtest_parse_evilnotify(struct aim_session_t *sess, struct command_rx_stru int faimtest_parse_msgerr(struct aim_session_t *sess, struct command_rx_struct *command, ...); int faimtest_parse_buddyrights(struct aim_session_t *sess, struct command_rx_struct *command, ...); int faimtest_parse_locerr(struct aim_session_t *sess, struct command_rx_struct *command, ...); +int faimtest_parse_genericerr(struct aim_session_t *sess, struct command_rx_struct *command, ...); static char *msgerrreasons[] = { "Invalid error", @@ -345,7 +346,7 @@ int faimtest_rateresp(struct aim_session_t *sess, struct command_rx_struct *comm aim_bos_ackrateresp(sess, command->conn); /* ack rate info response */ aim_bos_reqpersonalinfo(sess, command->conn); aim_bos_reqlocaterights(sess, command->conn); - aim_bos_setprofile(sess, command->conn, profile, NULL, AIM_CAPS_BUDDYICON | AIM_CAPS_CHAT | AIM_CAPS_VOICE | AIM_CAPS_GETFILE | AIM_CAPS_SENDFILE | AIM_CAPS_IMIMAGE); + aim_bos_setprofile(sess, command->conn, profile, NULL, AIM_CAPS_BUDDYICON | AIM_CAPS_CHAT | AIM_CAPS_VOICE | AIM_CAPS_GETFILE | AIM_CAPS_SENDFILE | AIM_CAPS_IMIMAGE | AIM_CAPS_GAMES | AIM_CAPS_SAVESTOCKS); aim_bos_reqbuddyrights(sess, command->conn); /* send the buddy list and profile (required, even if empty) */ @@ -674,8 +675,13 @@ int faimtest_parse_authresp(struct aim_session_t *sess, struct command_rx_struct aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_DEFAULT, aim_parse_unknown, 0); aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_MOTD, faimtest_parse_motd, 0); + aim_conn_addhandler(sess, bosconn, 0x0001, 0x0001, faimtest_parse_genericerr, 0); + aim_conn_addhandler(sess, bosconn, 0x0003, 0x0001, faimtest_parse_genericerr, 0); + 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_auth_sendcookie(sess, bosconn, cookie); return 1; @@ -1209,6 +1215,20 @@ int faimtest_parse_motd(struct aim_session_t *sess, struct command_rx_struct *co return 1; } +int faimtest_parse_genericerr(struct aim_session_t *sess, struct command_rx_struct *command, ...) +{ + va_list ap; + unsigned short reason; + + va_start(ap, command); + reason = va_arg(ap, int); + va_end(ap); + + printf("faimtest: snac threw error (reason 0x%04x: %s)\n", reason, (reason