Skip to content

Commit edb8bec

Browse files
author
Mika Leppänen
committed
Corrected system time check function return values
1 parent 85358a6 commit edb8bec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/6LoWPAN/ws/ws_pae_auth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,11 +935,11 @@ static uint32_t ws_pae_auth_lifetime_system_time_check(pae_auth_t *pae_auth, int
935935
if (pae_auth->system_time_diff > TIME_DIFFERENCE_THRESHOLD + seconds + dec_extra_seconds) {
936936
time_diff = pae_auth->system_time_diff - seconds - dec_extra_seconds;
937937
} else {
938-
return 0;
938+
return dec_extra_seconds;
939939
}
940940
pae_auth->system_time_diff = 0;
941941

942-
uint32_t new_dec_extra_seconds = 0;
942+
uint32_t new_dec_extra_seconds = dec_extra_seconds;
943943

944944
if (time_diff > 0) {
945945
/* If the system time has made a large jump then use the stored time to calculate the lifetime

0 commit comments

Comments
 (0)