From edb8bec60970d0dcbb3702aa28bf01d4e8aa7094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20Lepp=C3=A4nen?= Date: Thu, 2 Sep 2021 12:44:26 +0300 Subject: [PATCH] Corrected system time check function return values --- source/6LoWPAN/ws/ws_pae_auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/6LoWPAN/ws/ws_pae_auth.c b/source/6LoWPAN/ws/ws_pae_auth.c index 2b40ad59c72..493b3391cf3 100644 --- a/source/6LoWPAN/ws/ws_pae_auth.c +++ b/source/6LoWPAN/ws/ws_pae_auth.c @@ -935,11 +935,11 @@ static uint32_t ws_pae_auth_lifetime_system_time_check(pae_auth_t *pae_auth, int if (pae_auth->system_time_diff > TIME_DIFFERENCE_THRESHOLD + seconds + dec_extra_seconds) { time_diff = pae_auth->system_time_diff - seconds - dec_extra_seconds; } else { - return 0; + return dec_extra_seconds; } pae_auth->system_time_diff = 0; - uint32_t new_dec_extra_seconds = 0; + uint32_t new_dec_extra_seconds = dec_extra_seconds; if (time_diff > 0) { /* If the system time has made a large jump then use the stored time to calculate the lifetime