diff options
author | Alex Dowad <alexinbeijing@gmail.com> | 2014-04-14 21:59:33 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-04-25 10:19:05 +0300 |
commit | fe837d542866d7f30741c4a7f9ff2391dc8451a3 (patch) | |
tree | f7a263eafa3e94eb83cc62013336419c3fdc94e3 | |
parent | 39e52e8179972d92fe7cfa51da7f9dd5371b75d8 (diff) | |
download | squark-fe837d542866d7f30741c4a7f9ff2391dc8451a3.tar.bz2 squark-fe837d542866d7f30741c4a7f9ff2391dc8451a3.tar.xz |
authdb: report errors in adbc_refresh
-rw-r--r-- | src/authdb.c | 8 |
1 files changed, 6 insertions, 2 deletions
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; |