From cb1f2e0c01f33f6a1d6b0dd3415e7b5d716309f6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 25 Jan 2009 17:37:45 +0100 Subject: conf: added config_add_param() The function config_add_param() allows adding new configuration parameters. --- src/conf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/conf.c') diff --git a/src/conf.c b/src/conf.c index 9dfebc059..7560c02ba 100644 --- a/src/conf.c +++ b/src/conf.c @@ -23,6 +23,7 @@ #include +#include #include #include #include @@ -349,6 +350,15 @@ void config_read_file(const char *file) fclose(fp); } +void +config_add_param(const char *name, struct config_param *param) +{ + struct config_entry *entry = config_entry_get(name); + assert(entry != NULL); + + entry->params = g_slist_append(entry->params, param); +} + struct config_param * config_get_next_param(const char *name, const struct config_param * last) { -- cgit v1.2.3