[asterisk-commits] file: branch file/bridging r99698 - /team/file/bridging/main/bridging.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 22 17:03:52 CST 2008


Author: file
Date: Tue Jan 22 17:03:51 2008
New Revision: 99698

URL: http://svn.digium.com/view/asterisk?view=rev&rev=99698
Log:
It is up to the feature hook callback to change the bridge channel's state.

Modified:
    team/file/bridging/main/bridging.c

Change Statistics:
 0 files changed

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=99698&r1=99697&r2=99698
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Tue Jan 22 17:03:51 2008
@@ -696,14 +696,12 @@
 	/* Since we are done bringing DTMF in return to using both begin and end frames */
 	ast_clear_flag(bridge_channel->chan, AST_FLAG_END_DTMF_ONLY);
 
-	/* Now that we are over switch ourselves back to waiting */
-	bridge_channel->state = AST_BRIDGE_CHANNEL_STATE_WAIT;
-
 	/* If a hook was actually matched execute it on this channel, otherwise stream up the DTMF to the other channels */
 	if (hook) {
 		hook->callback(bridge, bridge_channel);
 	} else {
 		ast_bridge_dtmf_stream(bridge, dtmf, bridge_channel->chan);
+		bridge_channel->state = AST_BRIDGE_CHANNEL_STATE_WAIT;
 	}
 
 	/* And back into the groove... */
@@ -1243,16 +1241,14 @@
 /*! \brief Internal built in feature for blind transfers */
 static int feature_blind_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 {
-	ast_mutex_unlock(&bridge->lock);
-	ast_mutex_lock(&bridge->lock);
+	bridge_channel->state = AST_BRIDGE_CHANNEL_STATE_WAIT;
 	return 0;
 }
 
 /*! \brief Internal built in feature for attended transfers */
 static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 {
-	ast_mutex_unlock(&bridge->lock);
-	ast_mutex_lock(&bridge->lock);
+	bridge_channel->state = AST_BRIDGE_CHANNEL_STATE_WAIT;
 	return 0;
 }
 




More information about the asterisk-commits mailing list