[asterisk-commits] dvossel: branch 1.4 r183386 - in /branches/1.4: apps/ include/asterisk/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 19 14:40:20 CDT 2009


Author: dvossel
Date: Thu Mar 19 14:40:07 2009
New Revision: 183386

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=183386
Log:
Cleaning up a few things in detect disconnect patch

Initialized ast_call_feature in detect_disconnect to avoid accessing uninitialized memory.  Cleaned up /param tags in features.h.  No longer send dynamic features in ast_feature_detect. 

issue #11583

Modified:
    branches/1.4/apps/app_dial.c
    branches/1.4/include/asterisk/features.h
    branches/1.4/res/res_features.c

Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=183386&r1=183385&r2=183386
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Thu Mar 19 14:40:07 2009
@@ -792,7 +792,7 @@
 static int detect_disconnect(struct ast_channel *chan, char code, char *featurecode, int len)
 {
 	struct ast_flags features = { AST_FEATURE_DISCONNECT }; /* only concerned with disconnect feature */
-	struct ast_call_feature feature;
+	struct ast_call_feature feature = { 0, };
 	char *tmp;
 	int res;
 

Modified: branches/1.4/include/asterisk/features.h
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/include/asterisk/features.h?view=diff&rev=183386&r1=183385&r2=183386
==============================================================================
--- branches/1.4/include/asterisk/features.h (original)
+++ branches/1.4/include/asterisk/features.h Thu Mar 19 14:40:07 2009
@@ -101,7 +101,11 @@
 int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer,struct ast_bridge_config *config);
 
 /*! \brief detect a feature before bridging 
-    \param chan, ast_flags ptr, code, ast_call_feature ptr to be set if found */
+    \param chan
+    \param ast_flags ptr
+    \param char ptr of input code
+    \retval ast_call_feature ptr to be set if found 
+    \return result, was feature found or not */
 int ast_feature_detect(struct ast_channel *chan, struct ast_flags *features, char *code, struct ast_call_feature *feature);
 
 /*! \brief Pickup a call */

Modified: branches/1.4/res/res_features.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/res/res_features.c?view=diff&rev=183386&r1=183385&r2=183386
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Thu Mar 19 14:40:07 2009
@@ -1344,12 +1344,7 @@
 
 int ast_feature_detect(struct ast_channel *chan, struct ast_flags *features, char *code, struct ast_call_feature *feature) {
 
-	char *dynamic_features;
-	ast_channel_lock(chan);
-	dynamic_features = ast_strdupa(S_OR(pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"),""));
-	ast_channel_unlock(chan);
-
-	return feature_interpret_helper(chan, NULL, NULL, code, 0, dynamic_features, features, 0, feature);
+	return feature_interpret_helper(chan, NULL, NULL, code, 0, NULL, features, 0, feature);
 }
 
 static void set_config_flags(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config)




More information about the asterisk-commits mailing list