diff options
Diffstat (limited to 'accel-pptpd/triton/conf_file.c')
-rw-r--r-- | accel-pptpd/triton/conf_file.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/accel-pptpd/triton/conf_file.c b/accel-pptpd/triton/conf_file.c index b0bc58b7..e99afaa9 100644 --- a/accel-pptpd/triton/conf_file.c +++ b/accel-pptpd/triton/conf_file.c @@ -164,8 +164,23 @@ static struct conf_option_t *find_item(struct conf_sect_t *sect, const char *nam return NULL; } -struct conf_sect_t *conf_file_get_section(const char *name) +struct conf_sect_t * conf_get_section(const char *name) { return find_sect(name); } +char * conf_get_opt(const char *sect, const char *name) +{ + struct conf_option_t *opt; + struct conf_sect_t *s = conf_get_section(sect); + + if (!s) + return NULL; + + opt = find_item(s, name); + if (!opt) + return NULL; + + return opt->val; +} + |