[asterisk-commits] twilson: branch twilson/config_work r367055 - in /team/twilson/config_work: i...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 18 13:39:13 CDT 2012


Author: twilson
Date: Fri May 18 13:39:02 2012
New Revision: 367055

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=367055
Log:
No reason for aco_option_find to be public

Modified:
    team/twilson/config_work/include/asterisk/config_options.h
    team/twilson/config_work/main/config_options.c

Modified: team/twilson/config_work/include/asterisk/config_options.h
URL: http://svnview.digium.com/svn/asterisk/team/twilson/config_work/include/asterisk/config_options.h?view=diff&rev=367055&r1=367054&r2=367055
==============================================================================
--- team/twilson/config_work/include/asterisk/config_options.h (original)
+++ team/twilson/config_work/include/asterisk/config_options.h Fri May 18 13:39:02 2012
@@ -34,7 +34,6 @@
 #include "asterisk/astobj2.h"
 
 struct aco_option;
-struct aco_type;
 struct aco_info_internal;
 
 enum aco_type_t {
@@ -222,15 +221,6 @@
 /*! \brief Allocate a container to hold config options */
 struct ao2_container *aco_option_container_alloc(void);
 
-/*! \brief Find a config option that can handle the option \a name in \a category
- * \param container The container of options to search
- * \param name The field name of the option
- * \param category The category of the option
- *
- * \returns An option or NULL on error
- */
-struct aco_option *aco_option_find(struct ao2_container *container, const char *name, const char *category);
-
 /*! \brief Process a config info via the options registered with an aco_info
  *
  * \param info The config_options_info to be used for handling the config

Modified: team/twilson/config_work/main/config_options.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/config_work/main/config_options.c?view=diff&rev=367055&r1=367054&r2=367055
==============================================================================
--- team/twilson/config_work/main/config_options.c (original)
+++ team/twilson/config_work/main/config_options.c Fri May 18 13:39:02 2012
@@ -192,9 +192,9 @@
 	return strcasecmp(name, match->name) || !regexec(match->obj->regex, category, 0, NULL, 0) == !match->obj->category_match ? 0 : CMP_MATCH | CMP_STOP;
 }
 
-struct aco_option *aco_option_find(struct ao2_container *container, const char *name, const char *cat)
-{
-	return ao2_callback_data(container, OBJ_KEY, find_option_cb, (void *) name, (void *) cat);
+static struct aco_option *aco_option_find(struct aco_info *info, const char *name, const char *cat)
+{
+	return ao2_callback_data(info->internal->opts, OBJ_KEY, find_option_cb, (void *) name, (void *) cat);
 }
 
 struct ao2_container *aco_option_container_alloc(void)
@@ -404,7 +404,7 @@
 	struct ast_variable *var;
 
 	for (var = ast_variable_browse(cfg, cat); var; var = var->next) {
-		RAII_VAR(struct aco_option *, opt, aco_option_find(info->internal->opts, var->name, cat), ao2_cleanup);
+		RAII_VAR(struct aco_option *, opt, aco_option_find(info, var->name, cat), ao2_cleanup);
 		if (!opt) {
 			ast_log(LOG_ERROR, "Could not find option suitable for category '%s' named '%s' at line %d of %s\n", cat, var->name, var->lineno, var->file);
 			return -1;




More information about the asterisk-commits mailing list