summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-07-24 18:08:02 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-07-24 18:08:02 +0200
commitff3961ad2920ba674272b4f842f4456ed685a4a7 (patch)
tree4b54f90607d45857712e23bd451c1a627e89cdf4 /src
parent713f55a1f9958222f85238bde40482b566cf040e (diff)
conf: add handler argument to line-handler
Diffstat (limited to 'src')
-rw-r--r--src/conf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf.c b/src/conf.c
index cc7b19f..aa6b930 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -78,10 +78,11 @@ static void print_populated(const char *what, uint32_t n)
*
* @param filename Config file
* @param ch Line handler
+ * @param arg Handler argument
*
* @return 0 if success, otherwise errorcode
*/
-int conf_parse(const char *filename, confline_h *ch)
+int conf_parse(const char *filename, confline_h *ch, void *arg)
{
struct pl pl, val;
struct mbuf *mb;
@@ -122,7 +123,7 @@ int conf_parse(const char *filename, confline_h *ch)
if (!val.l || val.p[0] == '#')
continue;
- err = ch(&val);
+ err = ch(&val, arg);
}
out: