[asterisk-commits] rmudgett: branch group/bridge_construction r385034 - in /team/group/bridge_co...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 8 15:26:20 CDT 2013
Author: rmudgett
Date: Mon Apr 8 15:26:16 2013
New Revision: 385034
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385034
Log:
Make ast_bridge_channel_lock_bridge() more public.
Modified:
team/group/bridge_construction/include/asterisk/bridging.h
team/group/bridge_construction/main/bridging.c
Modified: team/group/bridge_construction/include/asterisk/bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/include/asterisk/bridging.h?view=diff&rev=385034&r1=385033&r2=385034
==============================================================================
--- team/group/bridge_construction/include/asterisk/bridging.h (original)
+++ team/group/bridge_construction/include/asterisk/bridging.h Mon Apr 8 15:26:16 2013
@@ -788,6 +788,25 @@
}
/*!
+ * \brief Lock the bridge associated with the bridge channel.
+ * \since 12.0.0
+ *
+ * \param bridge_channel Channel that wants to lock the bridge.
+ *
+ * \details
+ * This is an upstream lock operation. The defined locking
+ * order is bridge then bridge_channel.
+ *
+ * \note On entry, neither the bridge nor bridge_channel is locked.
+ *
+ * \note The bridge_channel->bridge pointer changes because of a
+ * bridge-merge/channel-move operation between bridges.
+ *
+ * \return Nothing
+ */
+void ast_bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel);
+
+/*!
* \brief Set bridge channel state to leave bridge (if not leaving already) with no lock.
*
* \param bridge_channel Channel to change the state on
Modified: team/group/bridge_construction/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/main/bridging.c?view=diff&rev=385034&r1=385033&r2=385034
==============================================================================
--- team/group/bridge_construction/main/bridging.c (original)
+++ team/group/bridge_construction/main/bridging.c Mon Apr 8 15:26:16 2013
@@ -193,25 +193,7 @@
return current ? 0 : -1;
}
-/*!
- * \internal
- * \brief Lock the bridge associated with the bridge channel.
- * \since 12.0.0
- *
- * \param bridge_channel Channel that wants to lock the bridge.
- *
- * \details
- * This is an upstream lock operation. The defined locking
- * order is bridge then bridge_channel.
- *
- * \note On entry, neither the bridge nor bridge_channel is locked.
- *
- * \note The bridge_channel->bridge pointer changes because of a
- * bridge-merge/channel-move operation between bridges.
- *
- * \return Nothing
- */
-static void bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel)
+void ast_bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel)
{
struct ast_bridge *bridge;
@@ -666,7 +648,7 @@
static void bridge_channel_write_frame(struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
{
- bridge_channel_lock_bridge(bridge_channel);
+ ast_bridge_channel_lock_bridge(bridge_channel);
bridge_channel->bridge->technology->write(bridge_channel->bridge, bridge_channel, frame);
ast_bridge_unlock(bridge_channel->bridge);
}
@@ -1669,7 +1651,7 @@
*/
static void bridge_channel_suspend(struct ast_bridge_channel *bridge_channel)
{
- bridge_channel_lock_bridge(bridge_channel);
+ ast_bridge_channel_lock_bridge(bridge_channel);
bridge_channel_suspend_nolock(bridge_channel);
ast_bridge_unlock(bridge_channel->bridge);
}
@@ -1712,7 +1694,7 @@
*/
static void bridge_channel_unsuspend(struct ast_bridge_channel *bridge_channel)
{
- bridge_channel_lock_bridge(bridge_channel);
+ ast_bridge_channel_lock_bridge(bridge_channel);
bridge_channel_unsuspend_nolock(bridge_channel);
ast_bridge_unlock(bridge_channel->bridge);
}
@@ -2217,7 +2199,7 @@
bridge_channel_wait(bridge_channel);
}
- bridge_channel_lock_bridge(bridge_channel);
+ ast_bridge_channel_lock_bridge(bridge_channel);
bridge_channel_pull(bridge_channel);
bridge_reconfigured(bridge_channel->bridge);
@@ -2658,7 +2640,7 @@
ao2_ref(bridge_channel, +1);
ast_channel_unlock(chan);
- bridge_channel_lock_bridge(bridge_channel);
+ ast_bridge_channel_lock_bridge(bridge_channel);
bridge = bridge_channel->bridge;
if (bridge_channel == find_bridge_channel(bridge, chan)) {
/* BUGBUG this needs more work. The channels need to be made compatible again if the formats change. The bridge_channel thread needs to monitor for this case. */
More information about the asterisk-commits
mailing list