Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 9362cc2 in mainline


Ignore:
Timestamp:
2015-06-06T15:48:36Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
8499160
Parents:
7c15d6f
Message:

Need to set reset flag before changing state, which causes callback function to be called.

Location:
uspace/srv/net/tcp
Files:
2 edited

Legend:

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

    r7c15d6f r9362cc2  
    412412{
    413413        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_reset()", conn->name);
     414        conn->reset = true;
    414415        tcp_conn_state_set(conn, st_closed);
    415         conn->reset = true;
    416416
    417417        tcp_conn_tw_timer_clear(conn);
  • uspace/srv/net/tcp/service.c

    r7c15d6f r9362cc2  
    9494
    9595        if (old_state != st_closed && nstate == st_closed && conn->reset) {
     96                log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_service_cstate_change: "
     97                    "Connection reset");
    9698                /* Connection reset */
    9799                tcp_ev_conn_reset(cconn);
     100        } else {
     101                log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_service_cstate_change: "
     102                    "old_state=%d nstate=%d conn->reset=%d",
     103                    old_state, nstate, conn->reset);
    98104        }
    99105
Note: See TracChangeset for help on using the changeset viewer.