summaryrefslogtreecommitdiffstats
path: root/src/authdb.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-01-04 14:48:51 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-01-04 14:48:51 +0200
commit55514d2e7006420fd2fe3f4887780aec8c49ab55 (patch)
treeaf0cd7e538b15c4f22055d012754ab99be789f54 /src/authdb.c
parent16ee995cfeff2af51b5f00b15fe1500cc4deeb99 (diff)
downloadsquark-55514d2e7006420fd2fe3f4887780aec8c49ab55.tar.bz2
squark-55514d2e7006420fd2fe3f4887780aec8c49ab55.tar.xz
authdb: fix config file modification detection
Diffstat (limited to 'src/authdb.c')
-rw-r--r--src/authdb.c4
1 files changed, 2 insertions, 2 deletions
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;