summaryrefslogtreecommitdiff
path: root/src/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c
index 2046216..2bb7d5a 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -289,6 +289,24 @@ int conf_get_sa(const struct conf *conf, const char *name, struct sa *sa)
}
+int conf_get_float(const struct conf *conf, const char *name, double *val)
+{
+ struct pl opt;
+ int err;
+
+ if (!conf || !name || !val)
+ return EINVAL;
+
+ err = conf_get(conf, name, &opt);
+ if (err)
+ return err;
+
+ *val = pl_float(&opt);
+
+ return 0;
+}
+
+
/**
* Configure the system with default settings
*