[asterisk-commits] twilson: branch twilson/config_work r362140 - in /team/twilson/config_work: a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Apr 14 10:52:17 CDT 2012


Author: twilson
Date: Sat Apr 14 10:52:13 2012
New Revision: 362140

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=362140
Log:
Add lookup function aco_type_find

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

Modified: team/twilson/config_work/apps/app_skel.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/config_work/apps/app_skel.c?view=diff&rev=362140&r1=362139&r2=362140
==============================================================================
--- team/twilson/config_work/apps/app_skel.c (original)
+++ team/twilson/config_work/apps/app_skel.c Sat Apr 14 10:52:13 2012
@@ -271,10 +271,10 @@
 	RAII_VAR(struct aco_type *, glob, NULL, ao2_cleanup);
 	RAII_VAR(struct aco_type *, priv, NULL, ao2_cleanup);
 
-	if (!(glob = ao2_find(cfg_info.objs, "global", OBJ_KEY))) {
+	if (!(glob = aco_type_find(&cfg_info, "global"))) {
 		return -1;
 	}
-	if (!(priv = ao2_find(cfg_info.objs, "private", OBJ_KEY))) {
+	if (!(priv = aco_type_find(&cfg_info, "private"))) {
 		return -1;
 	}
 

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=362140&r1=362139&r2=362140
==============================================================================
--- team/twilson/config_work/include/asterisk/config_options.h (original)
+++ team/twilson/config_work/include/asterisk/config_options.h Sat Apr 14 10:52:13 2012
@@ -100,6 +100,7 @@
 int aco_info_init(struct aco_info *info);
 void aco_info_destroy(struct aco_info *info);
 int aco_type_register(struct aco_info *info, struct aco_type *obj);
+struct aco_type *aco_type_find(struct aco_info *info, const char *name); 
 
 /*! \brief The option types with default handlers
  *

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=362140&r1=362139&r2=362140
==============================================================================
--- team/twilson/config_work/main/config_options.c (original)
+++ team/twilson/config_work/main/config_options.c Sat Apr 14 10:52:13 2012
@@ -596,6 +596,11 @@
 	return !ao2_link(info->objs, obj);
 }
 
+struct aco_type *aco_type_find(struct aco_info *info, const char *name)
+{
+	return ao2_find(info->objs, name, OBJ_KEY);
+}
+
 /* default config option handlers */
 
 int ast_config_option_int_fn(const struct aco_option *opt, struct ast_variable *var, void *obj) {




More information about the asterisk-commits mailing list