Changeset e374dee for libfaim/rxqueue.c


Ignore:
Timestamp:
Oct 10, 2003, 5:12:30 PM (18 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
fe6f1d3
Parents:
f4d0975
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfaim/rxqueue.c

    r862371b re374dee  
    8383 * Read a FLAP header from conn into fr, and return the number of bytes in the payload.
    8484 */
    85 static faim_shortfunc int aim_get_command_flap(aim_session_t *sess, aim_conn_t *conn, aim_frame_t *fr)
     85static int aim_get_command_flap(aim_session_t *sess, aim_conn_t *conn, aim_frame_t *fr)
    8686{
    8787        fu8_t flaphdr_raw[6];
     
    165165
    166166        if (!sess || !conn)
    167                 return -1;
     167                return -EINVAL;
    168168
    169169        if (conn->fd == -1)
     
    177177
    178178        if (!(newrx = (aim_frame_t *)calloc(sizeof(aim_frame_t), 1)))
    179                 return -1;
     179                return -ENOMEM;
    180180
    181181        /*
     
    183183         * function will break on them.
    184184         */
    185         if (conn->type == AIM_CONN_TYPE_RENDEZVOUS)
    186                 payloadlen = aim_get_command_rendezvous(sess, conn, newrx);
    187         else if (conn->type == AIM_CONN_TYPE_RENDEZVOUS_OUT) {
    188                 faimdprintf(sess, 0, "AIM_CONN_TYPE_RENDEZVOUS_OUT on fd %d\n", conn->fd);
     185        if (conn->type == AIM_CONN_TYPE_RENDEZVOUS) {
     186                int ret = aim_get_command_rendezvous(sess, conn, newrx);
     187
     188                if (ret < 0) {
     189                        free(newrx);
     190                        return -1;
     191                }
     192
     193                payloadlen = ret;
     194        } else if (conn->type == AIM_CONN_TYPE_LISTENER) {
     195                faimdprintf(sess, 0, "AIM_CONN_TYPE_LISTENER on fd %d\n", conn->fd);
    189196                free(newrx);
    190197                return -1;
Note: See TracChangeset for help on using the changeset viewer.