mirror of
https://github.com/owntracks/recorder.git
synced 2026-02-13 20:49:51 +00:00
[FIX] OTR_CLEAN_AGE default not correctly handled #500
This commit is contained in:
@@ -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
|
||||
#
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user