summaryrefslogtreecommitdiff
path: root/channels/chan_pjsip.c
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2013-12-13 18:33:25 +0000
committerKevin Harwell <kharwell@digium.com>2013-12-13 18:33:25 +0000
commit84e1790beb1c28f762fa991f99d4a41ede2c3935 (patch)
tree0d013a16a3d23b4e72c4392ca8875deb4206141c /channels/chan_pjsip.c
parentf425c4a086526d8f4da91d62a5e02121c09609b8 (diff)
bridge_native_rtp: Deadlock during 4-way conference creation
The change contains a slightly adjusted patch that was on the issue (submitted by kmoore). A fix was made by adding in a bridge lock while calling bridge_start/stop from the framehook callback. Since the framehook callback is not called from the bridging core the bridge is not locked, but needs to be before calling bridge_start. (closes issue ASTERISK-22749) Reported by: Kinsey Moore Review: https://reviewboard.asterisk.org/r/3066/ Patches: lock_inversion.diff uploaded by kmoore (license 6273) ........ Merged revisions 403767 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_pjsip.c')
-rw-r--r--channels/chan_pjsip.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 8db3f094f..21a79f0ed 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -292,14 +292,11 @@ static int chan_pjsip_set_rtp_peer(struct ast_channel *chan,
struct chan_pjsip_pvt *pvt = channel->pvt;
struct ast_sip_session *session = channel->session;
int changed = 0;
- struct ast_channel *bridge_peer;
/* Don't try to do any direct media shenanigans on early bridges */
- bridge_peer = ast_channel_bridge_peer(chan);
- if ((rtp || vrtp || tpeer) && !bridge_peer) {
+ if ((rtp || vrtp || tpeer) && !ast_channel_is_bridged(chan)) {
return 0;
}
- ast_channel_cleanup(bridge_peer);
if (nat_active && session->endpoint->media.direct_media.disable_on_nat) {
return 0;