diff options
| author | Dave Hibberd <hibby@debian.org> | 2026-09-29 21:39:29 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2026-09-29 21:39:29 +0100 |
| commit | 03996c90ad158bac0c79a96ac48a9ee18b55ffe0 (patch) | |
| tree | a55c533acacea4597ee1a8f44cd5b8fc762a36e2 /nodeapi.c | |
| parent | 98e42ffd455139c0f3ccbf4a670016dc0724a032 (diff) | |
| parent | 592e5967b8fcd79423802071319d0c646f2080df (diff) | |
Update upstream source from tag 'upstream/6.0.25.41+repack'
Update to upstream version '6.0.25.41+repack'
with Debian dir 3802bee500dcde3664bf28cab0ae7ef27f5ff7bd
Diffstat (limited to 'nodeapi.c')
| -rw-r--r-- | nodeapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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;
|
