Annotation of embedaddon/lighttpd/src/connections-glue.c, revision 1.1

1.1     ! misho       1: #include "base.h"
        !             2: #include "connections.h"
        !             3: 
        !             4: const char *connection_get_state(connection_state_t state) {
        !             5:        switch (state) {
        !             6:        case CON_STATE_CONNECT: return "connect";
        !             7:        case CON_STATE_READ: return "read";
        !             8:        case CON_STATE_READ_POST: return "readpost";
        !             9:        case CON_STATE_WRITE: return "write";
        !            10:        case CON_STATE_CLOSE: return "close";
        !            11:        case CON_STATE_ERROR: return "error";
        !            12:        case CON_STATE_HANDLE_REQUEST: return "handle-req";
        !            13:        case CON_STATE_REQUEST_START: return "req-start";
        !            14:        case CON_STATE_REQUEST_END: return "req-end";
        !            15:        case CON_STATE_RESPONSE_START: return "resp-start";
        !            16:        case CON_STATE_RESPONSE_END: return "resp-end";
        !            17:        default: return "(unknown)";
        !            18:        }
        !            19: }
        !            20: 
        !            21: const char *connection_get_short_state(connection_state_t state) {
        !            22:        switch (state) {
        !            23:        case CON_STATE_CONNECT: return ".";
        !            24:        case CON_STATE_READ: return "r";
        !            25:        case CON_STATE_READ_POST: return "R";
        !            26:        case CON_STATE_WRITE: return "W";
        !            27:        case CON_STATE_CLOSE: return "C";
        !            28:        case CON_STATE_ERROR: return "E";
        !            29:        case CON_STATE_HANDLE_REQUEST: return "h";
        !            30:        case CON_STATE_REQUEST_START: return "q";
        !            31:        case CON_STATE_REQUEST_END: return "Q";
        !            32:        case CON_STATE_RESPONSE_START: return "s";
        !            33:        case CON_STATE_RESPONSE_END: return "S";
        !            34:        default: return "x";
        !            35:        }
        !            36: }
        !            37: 
        !            38: int connection_set_state(server *srv, connection *con, connection_state_t state) {
        !            39:        UNUSED(srv);
        !            40: 
        !            41:        con->state = state;
        !            42: 
        !            43:        return 0;
        !            44: }
        !            45: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>