From 0b3e0de03e48b0f5d8fcccf77d16053ff1f86edd Mon Sep 17 00:00:00 2001 From: Akshai M Date: Thu, 14 May 2020 15:40:01 +0530 Subject: [PATCH] gnrc/tcp : Move GNRC_TCP_MSL to 'CONFIG_' --- sys/include/net/gnrc/tcp/config.h | 4 ++-- sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c | 2 +- tests/gnrc_tcp/Makefile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/include/net/gnrc/tcp/config.h b/sys/include/net/gnrc/tcp/config.h index e56e08ffa3..03a6d9a8c6 100644 --- a/sys/include/net/gnrc/tcp/config.h +++ b/sys/include/net/gnrc/tcp/config.h @@ -61,8 +61,8 @@ extern "C" { /** * @brief Maximum segment lifetime (MSL). Default is 30 seconds. */ -#ifndef GNRC_TCP_MSL -#define GNRC_TCP_MSL (30U * US_PER_SEC) +#ifndef CONFIG_GNRC_TCP_MSL +#define CONFIG_GNRC_TCP_MSL (30U * US_PER_SEC) #endif /** diff --git a/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c b/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c index 6843760ee8..29b61509f7 100644 --- a/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c +++ b/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c @@ -103,7 +103,7 @@ static int _restart_timewait_timer(gnrc_tcp_tcb_t *tcb) xtimer_remove(&tcb->tim_tout); tcb->msg_tout.type = MSG_TYPE_TIMEWAIT; tcb->msg_tout.content.ptr = (void *)tcb; - xtimer_set_msg(&tcb->tim_tout, 2 * GNRC_TCP_MSL, &tcb->msg_tout, gnrc_tcp_pid); + xtimer_set_msg(&tcb->tim_tout, 2 * CONFIG_GNRC_TCP_MSL, &tcb->msg_tout, gnrc_tcp_pid); return 0; } diff --git a/tests/gnrc_tcp/Makefile b/tests/gnrc_tcp/Makefile index 88776953f9..75d21c6f3b 100644 --- a/tests/gnrc_tcp/Makefile +++ b/tests/gnrc_tcp/Makefile @@ -13,7 +13,7 @@ TIMEOUT_US ?= 3000000 TEST_ON_CI_BLACKLIST += all CFLAGS += -DSHELL_NO_ECHO -CFLAGS += -DGNRC_TCP_MSL=$(MSL_US) +CFLAGS += -DCONFIG_GNRC_TCP_MSL=$(MSL_US) CFLAGS += -DCONFIG_GNRC_TCP_CONNECTION_TIMEOUT_DURATION=$(TIMEOUT_US) CFLAGS += -DGNRC_NETIF_SINGLE # Only one interface used and it makes # shell commands easier