Changeset e13307d in code for icbd.c


Ignore:
Timestamp:
Mar 7, 2014, 2:16:04 PM (11 years ago)
Author:
Mike Belopuhov <mike@…>
Branches:
master
Children:
058b664
Parents:
be3ad87
Message:

Move icbd_ioerr before the dispatch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icbd.c

    rbe3ad87 re13307d  
    350350 *  bufferevent functions
    351351 */
     352void
     353icbd_ioerr(struct bufferevent *bev __attribute__((__unused__)), short what,
     354    void *arg)
     355{
     356        struct icb_session *is = (struct icb_session *)arg;
     357
     358        if (what & EVBUFFER_TIMEOUT)
     359                icbd_drop(is, "timeout");
     360        else if (what & EVBUFFER_EOF)
     361                icbd_drop(is, NULL);
     362        else if (what & EVBUFFER_ERROR)
     363                icbd_drop(is, (what & EVBUFFER_READ) ? "read error" :
     364                    "write error");
     365}
    352366
    353367void
     
    419433        RB_REMOVE(icbd_sessions, &icbd_sessions, is);
    420434        free(is);
    421 }
    422 
    423 void
    424 icbd_ioerr(struct bufferevent *bev __attribute__((__unused__)), short what,
    425     void *arg)
    426 {
    427         struct icb_session *is = (struct icb_session *)arg;
    428 
    429         if (what & EVBUFFER_TIMEOUT)
    430                 icbd_drop(is, "timeout");
    431         else if (what & EVBUFFER_EOF)
    432                 icbd_drop(is, NULL);
    433         else if (what & EVBUFFER_ERROR)
    434                 icbd_drop(is, (what & EVBUFFER_READ) ? "read error" :
    435                     "write error");
    436435}
    437436
Note: See TracChangeset for help on using the changeset viewer.