Changeset ae481e0 in mainline for uspace/srv/net/tl/tcp/conn.c


Ignore:
Timestamp:
2011-12-29T14:47:00Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2943db4
Parents:
827ec41
Message:

Implement listening backlog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/conn.c

    r827ec41 rae481e0  
    121121        fibril_condvar_initialize(&conn->cstate_cv);
    122122
     123        conn->cstate_cb = NULL;
     124
    123125        conn->cstate = st_listen;
    124126        conn->reset = false;
     
    243245        tcp_cstate_t old_state;
    244246
     247        log_msg(LVL_DEBUG, "tcp_conn_state_set(%p)", conn);
     248
    245249        old_state = conn->cstate;
    246250        conn->cstate = nstate;
    247251        fibril_condvar_broadcast(&conn->cstate_cv);
     252
     253        /* Run user callback function */
     254        if (conn->cstate_cb != NULL) {
     255                log_msg(LVL_DEBUG, "tcp_conn_state_set() - run user CB");
     256                conn->cstate_cb(conn, conn->cstate_cb_arg);
     257        } else {
     258                log_msg(LVL_DEBUG, "tcp_conn_state_set() - no user CB");
     259        }
    248260
    249261        assert(old_state != st_closed);
Note: See TracChangeset for help on using the changeset viewer.