campaignd: Write config to disk even if the clock is running backwards

This commit is contained in:
Ignacio R. Morelle 2014-10-28 22:03:03 -03:00
parent 4946dc6bd7
commit 5fa2b70bcf

View file

@ -265,7 +265,7 @@ void server::run()
const time_t cur_ts = time(NULL);
// Write config to disk every ten minutes.
if(cur_ts - last_ts >= 10*60) {
if(abs(cur_ts - last_ts) >= 10*60) {
write_config();
last_ts = cur_ts;
}