From 55282a1b1dc376aecbb4b72d74b320b2ddb147f0 Mon Sep 17 00:00:00 2001 From: PeterKietzmann Date: Tue, 14 Jan 2020 12:33:41 +0100 Subject: [PATCH] net/gnrc/sixlowpan/frag/vrb:Move timeout macro to 'CONFIG_' namespace --- sys/include/net/gnrc/sixlowpan/config.h | 6 +++--- .../sixlowpan/frag/vrb/gnrc_sixlowpan_frag_vrb.c | 2 +- .../tests-gnrc_sixlowpan_frag_vrb.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/include/net/gnrc/sixlowpan/config.h b/sys/include/net/gnrc/sixlowpan/config.h index c5cf5d1da0..d215b1b86b 100644 --- a/sys/include/net/gnrc/sixlowpan/config.h +++ b/sys/include/net/gnrc/sixlowpan/config.h @@ -176,9 +176,9 @@ extern "C" { * @note Only applicable with * [gnrc_sixlowpan_frag_vrb](@ref net_gnrc_sixlowpan_frag_vrb) module. */ -#ifndef GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US -#define GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US (GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US) -#endif /* GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US */ +#ifndef CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US +#define CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US (CONFIG_GNRC_SIXLOWPAN_FRAG_RBUF_TIMEOUT_US) +#endif /* CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US */ /** * @name Selective fragment recovery configuration diff --git a/sys/net/gnrc/network_layer/sixlowpan/frag/vrb/gnrc_sixlowpan_frag_vrb.c b/sys/net/gnrc/network_layer/sixlowpan/frag/vrb/gnrc_sixlowpan_frag_vrb.c index 1c9cffe625..fb4c232916 100644 --- a/sys/net/gnrc/network_layer/sixlowpan/frag/vrb/gnrc_sixlowpan_frag_vrb.c +++ b/sys/net/gnrc/network_layer/sixlowpan/frag/vrb/gnrc_sixlowpan_frag_vrb.c @@ -192,7 +192,7 @@ void gnrc_sixlowpan_frag_vrb_gc(void) for (unsigned i = 0; i < CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_SIZE; i++) { if (!gnrc_sixlowpan_frag_vrb_entry_empty(&_vrb[i]) && - (now_usec - _vrb[i].super.arrival) > GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US) { + (now_usec - _vrb[i].super.arrival) > CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US) { DEBUG("6lo vrb: entry (%s, ", gnrc_netif_addr_to_str(_vrb[i].super.src, _vrb[i].super.src_len, diff --git a/tests/unittests/tests-gnrc_sixlowpan_frag_vrb/tests-gnrc_sixlowpan_frag_vrb.c b/tests/unittests/tests-gnrc_sixlowpan_frag_vrb/tests-gnrc_sixlowpan_frag_vrb.c index a37e5fc925..4e3fac7877 100644 --- a/tests/unittests/tests-gnrc_sixlowpan_frag_vrb/tests-gnrc_sixlowpan_frag_vrb.c +++ b/tests/unittests/tests-gnrc_sixlowpan_frag_vrb/tests-gnrc_sixlowpan_frag_vrb.c @@ -161,7 +161,7 @@ static void test_vrb_gc(void) gnrc_sixlowpan_frag_rb_base_t base = _base; gnrc_sixlowpan_frag_vrb_t *res; - base.arrival = xtimer_now_usec() - GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US - 1000; + base.arrival = xtimer_now_usec() - CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_TIMEOUT_US - 1000; TEST_ASSERT_NOT_NULL((res = gnrc_sixlowpan_frag_vrb_add(&base, &_dummy_netif, _out_dst,