[FIX] OTR_CLEAN_AGE default not correctly handled #500

This commit is contained in:
Christoph Krey
2024-10-02 11:14:08 +02:00
parent 9275341b94
commit 76b00e4b78
2 changed files with 8 additions and 1 deletions

View File

@@ -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
#

View File

@@ -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;
}
}