summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-06-08 05:18:22 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-06-08 05:18:22 +0000
commitc88b7945f64ef713da3791e2518608c1e65e90de (patch)
tree26e5bf9e5c31678abc43f31da664b439ccfa0d1b /include
parent661f6d499e9e5c509d09d7775f64625b398143ac (diff)
Fix a crash when a bridge switches from the softmix bridge technology to another.
A three party bridge uses the softmix bridging technology. This technology has a dedicated thread used to perform the analog mixing. When one of these parties leaves the bridge, the bridge technology is changed from the softmix technology to a two-party mixing technology. Changing technologies is done by removing channels from the old technology and adding them to the new technology. Since the remaining channels do not leave the bridge, the softmix mixing thread could continue to process all channels in the bridge. If the bridge code is not able to start destruction of the softmix technology before the softmix mixing thread wakes up, a crash happens. * Added a stop technology callback that technologies can use to request any helper threads to stop in preparation for being destroyed. (closes issue AST-1156) Reported by: John Bigelow git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/bridging_technology.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asterisk/bridging_technology.h b/include/asterisk/bridging_technology.h
index 8b9bbe0d0..6405545dd 100644
--- a/include/asterisk/bridging_technology.h
+++ b/include/asterisk/bridging_technology.h
@@ -63,6 +63,12 @@ struct ast_bridge_technology {
*/
int (*create)(struct ast_bridge *bridge);
/*!
+ * \brief Request a bridge technology instance stop in preparation for being destroyed.
+ *
+ * \note On entry, bridge is already locked.
+ */
+ void (*stop)(struct ast_bridge *bridge);
+ /*!
* \brief Destroy a bridging technology instance for a bridge.
*
* \note On entry, bridge must NOT be locked.