1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

gnrc_tcp: cleanup: shortend gnrc_tcp_tcb_init()

This commit is contained in:
Simon Brummer 2017-04-26 13:37:42 +02:00
parent 006b12e4b3
commit 2f0a17b80f
2 changed files with 1 additions and 6 deletions

View File

@ -199,16 +199,11 @@ void gnrc_tcp_tcb_init(gnrc_tcp_tcb_t *tcb)
#ifdef MODULE_GNRC_IPV6
tcb->address_family = AF_INET6;
#else
tcb->address_family = AF_UNSPEC;
DEBUG("gnrc_tcp.c : gnrc_tcp_tcb_init() : Address unspec, add netlayer module to makefile\n");
#endif
tcb->local_port = PORT_UNSPEC;
tcb->peer_port = PORT_UNSPEC;
tcb->state = FSM_STATE_CLOSED;
tcb->rtt_var = RTO_UNINITIALIZED;
tcb->srtt = RTO_UNINITIALIZED;
tcb->rto = RTO_UNINITIALIZED;
tcb->owner = KERNEL_PID_UNDEF;
mutex_init(&(tcb->fsm_lock));
mutex_init(&(tcb->function_lock));
}

View File

@ -34,7 +34,7 @@ extern "C" {
* @brief The TCP FSM states.
*/
typedef enum {
FSM_STATE_CLOSED,
FSM_STATE_CLOSED = 0,
FSM_STATE_LISTEN,
FSM_STATE_SYN_SENT,
FSM_STATE_SYN_RCVD,