summaryrefslogtreecommitdiff
path: root/accel-pptpd/triton/conf_file.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-09-02 19:01:47 +0400
committerKozlov Dmitry <dima@server>2010-09-02 19:01:47 +0400
commitb43d224c8a306ff54bbb913c5aab891f82541f6e (patch)
treec3b6c135030fcd4bba4a2ea44d21745fba254a6c /accel-pptpd/triton/conf_file.c
parent81515c09f55f152e8330c3b43ad159be64f494e8 (diff)
downloadaccel-ppp-b43d224c8a306ff54bbb913c5aab891f82541f6e.tar.gz
accel-ppp-b43d224c8a306ff54bbb913c5aab891f82541f6e.zip
rewriting triton library ...
Diffstat (limited to 'accel-pptpd/triton/conf_file.c')
-rw-r--r--accel-pptpd/triton/conf_file.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/accel-pptpd/triton/conf_file.c b/accel-pptpd/triton/conf_file.c
index b0bc58b..e99afaa 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;
+}
+