From 592e5967b8fcd79423802071319d0c646f2080df Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 29 Sep 2026 21:39:24 +0100 Subject: New upstream version 6.0.25.41+repack --- nodeapi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nodeapi.c') diff --git a/nodeapi.c b/nodeapi.c index 148728b..16d9ef2 100644 --- a/nodeapi.c +++ b/nodeapi.c @@ -246,7 +246,7 @@ Token * generate_token() token->token[i] = 'A' + rand() % 26; // Random uppercase alphabet character } token->token[TOKEN_SIZE] = '\0'; // Null-terminate the token - token->expiration_time = time(NULL) + TOKEN_EXPIRATION; // Set token expiration time + token->expiration_time = NOW + TOKEN_EXPIRATION; // Set token expiration time add_token_to_list(token); return token; } @@ -280,7 +280,7 @@ int verify_token(const char* token) if (existing_token != NULL) { // Check if the token has expired - time_t current_time = time(NULL); + time_t current_time = NOW; if (current_time > existing_token->expiration_time) { // Token has expired, remove it from the token list @@ -297,7 +297,7 @@ int verify_token(const char* token) void remove_expired_tokens() { - time_t current_time = time(NULL); + time_t current_time = NOW; Token* current_token = token_list; Token* prev_token = NULL; Token* next_token; -- cgit v1.2.3