X-Git-Url: http://andersk.mit.edu/gitweb/libfaim.git/blobdiff_plain/5daacaa384bc7b77255078b512634a407708fe2e..225174938751264d2d11d880ca820a66961c694c:/aim_rxhandlers.c?ds=sidebyside diff --git a/aim_rxhandlers.c b/aim_rxhandlers.c index 220394f..bc67cbf 100644 --- a/aim_rxhandlers.c +++ b/aim_rxhandlers.c @@ -348,7 +348,7 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess) head = aimutil_get32(workingPtr->data); if ((head == 0x00000001) && (workingPtr->commandlen == 4)) { faimdprintf(1, "got connection ack on auth line\n"); - workingPtr->handled = 1; + workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_FLAPVER, workingPtr); } else if (workingPtr->hdr.oscar.type == 0x04) { /* Used only by the older login protocol */ workingPtr->handled = aim_authparse(sess, workingPtr); @@ -405,7 +405,7 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess) switch (family) { case 0x0000: /* not really a family, but it works */ if (subtype == 0x0001) - workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, 0x0000, 0x0001, workingPtr); + workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_FLAPVER, workingPtr); else workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_UNKNOWN, workingPtr); break; @@ -541,10 +541,9 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess) u_short subtype; family = aimutil_get16(workingPtr->data); subtype= aimutil_get16(workingPtr->data+2); - - if ((family == 0x0002) && (subtype == 0x0006)) { - workingPtr->handled = 1; - aim_conn_setstatus(workingPtr->conn, AIM_CONN_STATUS_READY); + + if ((family == 0x0000) && (subtype == 0x00001)) { + workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_FLAPVER, workingPtr); } else if ((family == 0x000d) && (subtype == 0x0009)) { workingPtr->handled = aim_chatnav_parse_info(sess, workingPtr); } else { @@ -558,9 +557,9 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess) family = aimutil_get16(workingPtr->data); subtype= aimutil_get16(workingPtr->data+2); - if ((family == 0x0000) && (subtype == 0x00001)) - workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, 0x0000, 0x0001, workingPtr); - else if (family == 0x0001) { + if ((family == 0x0000) && (subtype == 0x00001)) { + workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_FLAPVER, workingPtr); + } else if (family == 0x0001) { if (subtype == 0x0001) workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, 0x0001, 0x0001, workingPtr); else if (subtype == 0x0003) @@ -804,6 +803,9 @@ faim_internal int aim_parse_unknown(struct aim_session_t *sess, { u_int i = 0; + if (!sess || !command) + return 1; + faimdprintf(1, "\nRecieved unknown packet:"); for (i = 0; i < command->commandlen; i++)