[asterisk-commits] rmudgett: trunk r390733 - in /trunk: apps/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 6 15:47:12 CDT 2013


Author: rmudgett
Date: Thu Jun  6 15:47:10 2013
New Revision: 390733

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390733
Log:
* Fix a couple missed hook installs that need AST_BRIDGE_HOOK_REMOVE_ON_PULL.

* Rename some hook flag parameters to remove_flags.

Modified:
    trunk/apps/app_bridgewait.c
    trunk/main/bridging.c
    trunk/main/features.c

Modified: trunk/apps/app_bridgewait.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_bridgewait.c?view=diff&rev=390733&r1=390732&r2=390733
==============================================================================
--- trunk/apps/app_bridgewait.c (original)
+++ trunk/apps/app_bridgewait.c Thu Jun  6 15:47:10 2013
@@ -141,7 +141,7 @@
 
 	/* Limits struct holds time as milliseconds, so muliply 1000x */
 	hold_limits.duration *= 1000;
-	ast_bridge_features_set_limits(features, &hold_limits, 1 /* remove_on_pull */);
+	ast_bridge_features_set_limits(features, &hold_limits, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
 	ast_bridge_features_limits_destroy(&hold_limits);
 
 	return 0;

Modified: trunk/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/bridging.c?view=diff&rev=390733&r1=390732&r2=390733
==============================================================================
--- trunk/main/bridging.c (original)
+++ trunk/main/bridging.c Thu Jun  6 15:47:10 2013
@@ -75,7 +75,7 @@
 
 static void cleanup_video_mode(struct ast_bridge *bridge);
 static int bridge_make_compatible(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel);
-static void bridge_features_remove(struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags flags);
+static void bridge_features_remove(struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags remove_flags);
 
 /*! Default DTMF keys for built in features */
 static char builtin_features_dtmf[AST_BRIDGE_BUILTIN_END][MAXIMUM_DTMF_FEATURE_STRING];
@@ -4626,17 +4626,17 @@
  *
  * \param obj Feature hook object.
  * \param arg Removal flags
- * \param unused Not used
+ * \param flags Not used
  *
  * \retval CMP_MATCH if hook's remove_flags match the removal flags set.
  * \retval 0 if not match.
  */
-static int hook_remove_match(void *obj, void *arg, int unused)
+static int hook_remove_match(void *obj, void *arg, int flags)
 {
 	struct ast_bridge_hook *hook = obj;
-	enum ast_bridge_hook_remove_flags *flags = arg;
-
-	if (ast_test_flag(&hook->remove_flags, *flags)) {
+	enum ast_bridge_hook_remove_flags *remove_flags = arg;
+
+	if (ast_test_flag(&hook->remove_flags, *remove_flags)) {
 		return CMP_MATCH;
 	} else {
 		return 0;
@@ -4649,14 +4649,14 @@
  * \since 12.0.0
  *
  * \param hooks Hooks container to work on.
- * \param flags Determinator for whether hook is removed
+ * \param remove_flags Determinator for whether hook is removed
  *
  * \return Nothing
  */
-static void hooks_remove_container(struct ao2_container *hooks, enum ast_bridge_hook_remove_flags flags)
+static void hooks_remove_container(struct ao2_container *hooks, enum ast_bridge_hook_remove_flags remove_flags)
 {
 	ao2_callback(hooks, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE,
-		hook_remove_match, &flags);
+		hook_remove_match, &remove_flags);
 }
 
 /*!
@@ -4665,11 +4665,11 @@
  * \since 12.0.0
  *
  * \param hooks Hooks heap to work on.
- * \param flags Determinator for whether hook is removed
+ * \param remove_flags Determinator for whether hook is removed
  *
  * \return Nothing
  */
-static void hooks_remove_heap(struct ast_heap *hooks, enum ast_bridge_hook_remove_flags flags)
+static void hooks_remove_heap(struct ast_heap *hooks, enum ast_bridge_hook_remove_flags remove_flags)
 {
 	struct ast_bridge_hook *hook;
 	int changed;
@@ -4681,7 +4681,7 @@
 		changed = 0;
 		for (idx = ast_heap_size(hooks); idx; --idx) {
 			hook = ast_heap_peek(hooks, idx);
-			if (ast_test_flag(&hook->remove_flags, flags)) {
+			if (ast_test_flag(&hook->remove_flags, remove_flags)) {
 				ast_heap_remove(hooks, hook);
 				ao2_ref(hook, -1);
 				changed = 1;
@@ -4697,17 +4697,17 @@
  * \since 12.0.0
  *
  * \param features Bridge features structure
- * \param flags Determinator for whether hook is removed.
+ * \param remove_flags Determinator for whether hook is removed.
  *
  * \return Nothing
  */
-static void bridge_features_remove(struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags flags)
-{
-	hooks_remove_container(features->dtmf_hooks, flags);
-	hooks_remove_container(features->hangup_hooks, flags);
-	hooks_remove_container(features->join_hooks, flags);
-	hooks_remove_container(features->leave_hooks, flags);
-	hooks_remove_heap(features->interval_hooks, flags);
+static void bridge_features_remove(struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags remove_flags)
+{
+	hooks_remove_container(features->dtmf_hooks, remove_flags);
+	hooks_remove_container(features->hangup_hooks, remove_flags);
+	hooks_remove_container(features->join_hooks, remove_flags);
+	hooks_remove_container(features->leave_hooks, remove_flags);
+	hooks_remove_heap(features->interval_hooks, remove_flags);
 }
 
 static int interval_hook_time_cmp(void *a, void *b)

Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=390733&r1=390732&r2=390733
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Thu Jun  6 15:47:10 2013
@@ -4307,7 +4307,7 @@
 	}
 
 	return ast_bridge_dtmf_hook(features, dtmf, app_dtmf_feature_hook,
-		app_data, ast_free_ptr, 1);
+		app_data, ast_free_ptr, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
 }
 
 /*!




More information about the asterisk-commits mailing list