From fe837d542866d7f30741c4a7f9ff2391dc8451a3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 14 Apr 2014 21:59:33 +0200 Subject: authdb: report errors in adbc_refresh --- src/authdb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/authdb.c') diff --git a/src/authdb.c b/src/authdb.c index c9a5dd3..53b015f 100644 --- a/src/authdb.c +++ b/src/authdb.c @@ -357,16 +357,20 @@ int adbc_refresh(struct authdb_config *cfg, time_t now) if (cfg->last_check != 0 && cfg->last_check + 2*60 > now) return 0; - if (stat(squark_config, &st) != 0) + if (stat(squark_config, &st) != 0) { + report_error("Error occurred while checking attributes of config file: %s\n", strerror(errno)); return -1; + } cfg->last_check = now; if (cfg->last_change == st.st_ctime) return 0; in = fopen(squark_config, "r"); - if (in == NULL) + if (in == NULL) { + report_error("Error occurred while opening config file: %s\n", strerror(errno)); return -1; + } cfg->last_change = st.st_ctime; cfg->block_categories = 0; -- cgit v1.2.3