summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2014-12-02 00:38:08 +0000
committerGeorge Joseph <george.joseph@fairview5.com>2014-12-02 00:38:08 +0000
commita53efbb86c275507b9569a058b3a6391571392dc (patch)
treeb27f3a6bdd2889bcabffc31ea4c4306d0b93ea26 /include
parent7472c661ca1f6509ed0fa4c07b7e6e1c306eb643 (diff)
config: Create ast_variable_find_in_list()
Add const char *ast_variable_find_in_list(const struct ast_variable *list, const char *variable); ast_variable_find() requires a config category to search whereas ast_variable_find_in_list() just needs the root list element which is useful if you don't have a category. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4217/ ........ Merged revisions 428733 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/config.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index 2f604e0be..7f0434d88 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -312,6 +312,20 @@ const char *ast_variable_retrieve(struct ast_config *config,
const char *ast_variable_find(const struct ast_category *category, const char *variable);
/*!
+ * \brief Gets a variable from a variable list
+ *
+ * \param list variable list to search
+ * \param variable which variable you wish to get the data for
+ *
+ * \details
+ * Goes through a given variable list and searches for the given variable
+ *
+ * \retval The variable value on success
+ * \retval NULL if unable to find it.
+ */
+const char *ast_variable_find_in_list(const struct ast_variable *list, const char *variable);
+
+/*!
* \brief Retrieve a category if it exists
*
* \param config which config to use