aboutsummaryrefslogtreecommitdiffstats
path: root/src/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c
index 77dafbbcf..2a5ea9e5f 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -362,6 +362,19 @@ char *getConfigParamValue(char *name)
return param->value;
}
+int getBoolConfigParam(char *name)
+{
+ ConfigParam *param;
+
+ param = getConfigParam(name);
+ if (!param) return -1;
+
+ if (strcmp("yes", param->value) == 0) return 1;
+ else if (strcmp("no", param->value) == 0) return 0;
+
+ return -1;
+}
+
BlockParam *getBlockParam(ConfigParam * param, char *name)
{
BlockParam *ret = NULL;