aboutsummaryrefslogtreecommitdiffstats
path: root/src/confparser.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-12-06 09:23:52 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-12-06 09:23:52 +0200
commiteabd52462bfdb409121b351f198d535649d2b3b9 (patch)
tree434ec71438df3c822d34fc0b8d83fa977264c546 /src/confparser.c
parentbd85acf6a408674bcdcb5116963fe4fea2247280 (diff)
downloadck-eabd52462bfdb409121b351f198d535649d2b3b9.tar.gz
ck-eabd52462bfdb409121b351f198d535649d2b3b9.tar.bz2
ck-eabd52462bfdb409121b351f198d535649d2b3b9.zip
Add log to file, fix list ckconf bug
Diffstat (limited to 'src/confparser.c')
-rw-r--r--src/confparser.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/confparser.c b/src/confparser.c
index f7b6268..fe1c19a 100644
--- a/src/confparser.c
+++ b/src/confparser.c
@@ -129,15 +129,20 @@ int config_file_parse(Conf *conf, UserOpt *opt) {
return -1;
}
}
- /* Could add an optional row that would make the config var
- * optional. */
+ /* Check if every non optional
+ * variable was read. */
#define X(var, str, name, optional) \
if (!optional && !conf->var) { \
ERR("Missing %s", name); \
return -1; \
}
- CONFIG_VARIABLES_TABLE
+ CONFIG_VARIABLES_TABLE;
#undef X
+
+ /* Update ckerrlog logfile */
+ if (conf->log_dir) {
+ errlog_make_logfile(conf->log_dir);
+ }
return 0;
}