Skip to content

Commit

Permalink
[FIX] OTR_CLEAN_AGE default not correctly handled #500
Browse files Browse the repository at this point in the history
  • Loading branch information
ckrey committed Oct 2, 2024
1 parent 9275341 commit 76b00e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions etc/ot-recorder.default
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@

# OTR_PRECISION=7

# -----------------------------------------------------
# Reverse geo cache expiration time in seconds
# Purge geo gcache entries after these seconds; default 0, disable with 0
#

# OTR_CLEAN_AGE=0

# -----------------------------------------------------
# Browser API key for Google maps
#
Expand Down
2 changes: 1 addition & 1 deletion recorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ void handle_message(void *userdata, char *topic, char *payload, size_t payloadle
cache_tst = j->number_;
}

if ((time(0) - cache_tst) <= ud->clean_age) {
if (ud->clean_age == 0L || (time(0) - cache_tst) <= ud->clean_age) {
fresh = true;
}
}
Expand Down

0 comments on commit 76b00e4

Please sign in to comment.