aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-16 10:07:24 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-16 10:07:24 +0000
commitb483469ff739d3dd3de9094e1d4e6f42be978a38 (patch)
tree52e6226f825c8c3c3043bc83456a828a21ecf283 /main
parentdb7fa2657cfe39af1042ecac83d660aacb834668 (diff)
add a small new function to retrieve variables from a config
once we have a pointer to the category. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89322 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c
index 134add80a..27c34ec15 100644
--- a/main/config.c
+++ b/main/config.c
@@ -587,6 +587,12 @@ static struct ast_category *next_available_category(struct ast_category *cat)
return cat;
}
+/*! return the first var of a category */
+struct ast_variable *ast_category_first(struct ast_category *cat)
+{
+ return (cat) ? cat->root : NULL;
+}
+
struct ast_variable *ast_category_root(struct ast_config *config, char *cat)
{
struct ast_category *category = ast_category_get(config, cat);