summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2012-01-13 16:48:06 +0000
committerMatthew Jordan <mjordan@digium.com>2012-01-13 16:48:06 +0000
commita8276fe8efbca7e14862c469c0c95df71b506947 (patch)
tree8f777b718c107a4ba51c9f9fe93e347545e64ad2 /bridges
parent19a976108479e82e6d6d9eadae2e7cc20a98a0ac (diff)
Fix crash from bridge channel hangup race condition in ConfBridge
This patch addresses two issues in ConfBridge and the channel bridge layer: 1. It fixes a race condition wherein the bridge channel could be hung up 2. It removes the deadlock avoidance from the bridging layer and makes the bridge_pvt an ao2 ref counted object Patch by David Vossel (mjordan was merely the commit monkey) (issue ASTERISK-18988) (closes issue ASTERISK-18885) Reported by: Dmitry Melekhov Tested by: Matt Jordan Patches: chan_bridge_cleanup_v.diff uploaded by David Vossel (license 5628) (closes issue ASTERISK-19100) Reported by: Matt Jordan Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1654/ ........ Merged revisions 350550 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'bridges')
-rw-r--r--bridges/bridge_builtin_features.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bridges/bridge_builtin_features.c b/bridges/bridge_builtin_features.c
index 5fdb664d5..9da02f1aa 100644
--- a/bridges/bridge_builtin_features.c
+++ b/bridges/bridge_builtin_features.c
@@ -123,7 +123,7 @@ static int feature_blind_transfer(struct ast_bridge *bridge, struct ast_bridge_c
}
/* This is sort of the fun part. We impart the above channel onto the bridge, and have it take our place. */
- ast_bridge_impart(bridge, chan, bridge_channel->chan, NULL);
+ ast_bridge_impart(bridge, chan, bridge_channel->chan, NULL, 1);
return 0;
}
@@ -200,7 +200,7 @@ static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridg
ast_bridge_features_set_flag(&called_features, AST_BRIDGE_FLAG_DISSOLVE);
/* This is how this is going down, we are imparting the channel we called above into this bridge first */
- ast_bridge_impart(attended_bridge, chan, NULL, &called_features);
+ ast_bridge_impart(attended_bridge, chan, NULL, &called_features, 1);
/* Before we join setup a features structure with the hangup option, just in case they want to use DTMF */
ast_bridge_features_init(&caller_features);
@@ -222,9 +222,9 @@ static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridg
/* If the user wants to turn this into a threeway transfer then do so, otherwise they take our place */
if (attended_bridge_result == AST_BRIDGE_CHANNEL_STATE_DEPART) {
/* We want to impart them upon the bridge and just have us return to it as normal */
- ast_bridge_impart(bridge, chan, NULL, NULL);
+ ast_bridge_impart(bridge, chan, NULL, NULL, 1);
} else {
- ast_bridge_impart(bridge, chan, bridge_channel->chan, NULL);
+ ast_bridge_impart(bridge, chan, bridge_channel->chan, NULL, 1);
}
} else {
ast_stream_and_wait(bridge_channel->chan, "beeperr", AST_DIGIT_ANY);