Ignore:
File:
1 edited

Legend:

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

    r2f0dd2a 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.