1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #6972 from brummer-simon/gnrc_tcp-cleanup-gnrc_tcp_tcb_init

gnrc_tcp: cleanup: shortend gnrc_tcp_tcb_init()
This commit is contained in:
Martine Lenders 2017-04-26 14:46:52 +02:00 committed by GitHub
commit ddda31c509
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,