summaryrefslogtreecommitdiff
path: root/include/asterisk/bridge_technology.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-08-16 15:22:04 -0500
committerRichard Mudgett <rmudgett@digium.com>2017-08-22 11:59:49 -0500
commit6ad8249233080aab4f2ea0e72f3e0b7ef384f243 (patch)
tree923b8dfbbb3e6acb5db30ba351e2b8a3c77c0158 /include/asterisk/bridge_technology.h
parent9c70c883697d63e6f16b0b06b688a6131423c7e1 (diff)
bridge: Fix softmix bridge deadlock.
* Fix deadlock in bridge_softmix.c:softmix_bridge_stream_topology_changed() between bridge_channel and channel locks. * The new bridge technology topology change callbacks must be called with the bridge locked. The callback references the bridge channel list, the bridge technology could change, and the bridge stream mapping is updated. ASTERISK-27212 Change-Id: Ide4360ab853607e738ad471721af3f561ddd83be
Diffstat (limited to 'include/asterisk/bridge_technology.h')
-rw-r--r--include/asterisk/bridge_technology.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/include/asterisk/bridge_technology.h b/include/asterisk/bridge_technology.h
index 8cebe9326..def7b1933 100644
--- a/include/asterisk/bridge_technology.h
+++ b/include/asterisk/bridge_technology.h
@@ -164,20 +164,30 @@ struct ast_bridge_technology {
/*!
* \brief Callback for when a request has been made to change a stream topology on a channel
*
- * This is called when a bridge receives a request to change the topology on the channel. A bridge
- * technology should define a handler for this callback if it needs to update internals or intercept
- * the request and not pass it on to other channels. This can be done by returning a nonzero value.
+ * \details
+ * This is called when a bridge receives a request to change the
+ * topology on the channel. A bridge technology should define a
+ * handler for this callback if it needs to update internals or
+ * intercept the request and not pass it on to other channels.
+ * This can be done by returning a nonzero value.
*
- * \retval 0 Frame accepted by the bridge.
- * \retval -1 Frame rejected.
+ * \retval 0 Frame can pass to the bridge technology.
+ * \retval non-zero Frame intercepted by the bridge technology.
+ *
+ * \note On entry, bridge is already locked.
*/
int (*stream_topology_request_change)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel);
/*!
* \brief Callback for when a stream topology changes on the channel
*
- * This is called when a bridge receives an indication that a topology has been changed on a channel
- * and the new topology has been mapped to the bridge. A bridge technology should define a handler for
- * this callback if it needs to update internals due to a channel's topology changing.
+ * \details
+ * This is called when a bridge receives an indication that a
+ * topology has been changed on a channel and the new topology has
+ * been mapped to the bridge. A bridge technology should define a
+ * handler for this callback if it needs to update internals due
+ * to a channel's topology changing.
+ *
+ * \note On entry, bridge is already locked.
*/
void (*stream_topology_changed)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel);
/*! TRUE if the bridge technology is currently suspended. */