[asterisk-commits] mmichelson: branch mmichelson/features_config r389959 - /team/mmichelson/feat...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 28 15:39:26 CDT 2013


Author: mmichelson
Date: Tue May 28 15:39:22 2013
New Revision: 389959

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389959
Log:
REmove some redundant code.


Modified:
    team/mmichelson/features_config/main/features_config.c

Modified: team/mmichelson/features_config/main/features_config.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/features_config.c?view=diff&rev=389959&r1=389958&r2=389959
==============================================================================
--- team/mmichelson/features_config/main/features_config.c (original)
+++ team/mmichelson/features_config/main/features_config.c Tue May 28 15:39:22 2013
@@ -683,29 +683,6 @@
 	return ds;
 }
 
-/*!
- * \internal
- * \brief Get the extension for a given builtin feature
- *
- * \pre expects features_lock to be readlocked
- *
- * \retval 0 success
- * \retval non-zero failiure
- */
-static int builtin_feature_get_exten(struct ast_channel *chan, const char *feature_name,
-		char *buf, size_t len)
-{
-	RAII_VAR(struct features_config *, cfg, NULL, ao2_cleanup);
-	SCOPED_CHANNELLOCK(lock, chan);
-	
-	cfg = get_feature_ds(chan);
-	if (!cfg) {
-		return -1;
-	}
-
-	return featuremap_get(cfg->featuremap, feature_name, buf, len);
-}
-
 struct ast_features_general_config *ast_get_chan_features_general_config(struct ast_channel *chan)
 {
 	RAII_VAR(struct features_config *, cfg, NULL, ao2_cleanup);
@@ -1130,8 +1107,9 @@
 	       char *buf, size_t len)
 {
 	int res;
-
-	res = builtin_feature_get_exten(chan, data, buf, len);
+	SCOPED_CHANNELLOCK(lock, chan);
+
+	res = ast_get_builtin_feature(chan, data, buf, len);
 
 	if (res) {
 		ast_log(LOG_WARNING, "Invalid argument '%s' to FEATUREMAP()\n", data);




More information about the asterisk-commits mailing list