From 55514d2e7006420fd2fe3f4887780aec8c49ab55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 4 Jan 2012 14:48:51 +0200 Subject: authdb: fix config file modification detection --- src/authdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/authdb.c') diff --git a/src/authdb.c b/src/authdb.c index 8c17ed9..ed309fe 100644 --- a/src/authdb.c +++ b/src/authdb.c @@ -347,15 +347,15 @@ int adbc_refresh(struct authdb_config *cfg, time_t now) if (stat(squark_config, &st) != 0) return -1; + cfg->last_check = now; if (cfg->last_change == st.st_ctime) return 0; - /* check timestamp */ - in = fopen(squark_config, "r"); if (in == NULL) return -1; + cfg->last_change = st.st_ctime; cfg->block_categories = 0; cfg->hard_block_categories = 0; cfg->logout_timeout = DEFAULT_LOGOUT_TIMEOUT; -- cgit v1.2.3