summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2014-10-16 17:32:16 +0000
committerGeorge Joseph <george.joseph@fairview5.com>2014-10-16 17:32:16 +0000
commitc2ec5f0f6f7f9b6b8e87490c4c09166641beee7b (patch)
treec39cdb3da9ae9b502c06201c8e06f1558f3b1bc3 /include/asterisk
parent86a4ce495783434f6d4fef5484b44147e4b3a7b7 (diff)
config: Fix inf loop using ast_category_browse and ast_variable_retrieve
Fix infinite loop when calling ast_variable_retrieve inside an ast_category_browse loop when there is more than 1 category with the same name. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4089/ ........ Merged revisions 425713 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 425714 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/config.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index 0919a58bc..2f604e0be 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -238,6 +238,11 @@ struct ast_category *ast_category_browse_filtered(struct ast_config *config,
*
* \retval a category name on success
* \retval NULL on failure/no-more-categories
+ *
+ * \note ast_category_browse maintains internal state. Therefore is not thread
+ * safe, cannot be called recursively, and it is not safe to add or remove
+ * categories while browsing.
+ * ast_category_browse_filtered does not have these restrictions.
*/
char *ast_category_browse(struct ast_config *config, const char *prev_name);
@@ -257,10 +262,6 @@ char *ast_category_browse(struct ast_config *config, const char *prev_name);
*
* \retval ast_variable list on success
* \retval NULL on failure
- *
- * \note ast_category_browse is not thread safe and it is not safe to call
- * ast_category_delete while browsing using ast_category_browse.
- * ast_category_browse_filtered does not have these restrictions.
*/
struct ast_variable *ast_variable_browse_filtered(const struct ast_config *config,
const char *category_name, const char *filter);