diff options
author | Richard Mudgett <rmudgett@digium.com> | 2012-04-20 16:23:01 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2012-04-20 16:23:01 +0000 |
commit | 01194c581139eb19063700418ce2a1df0c69ef02 (patch) | |
tree | 744a7cd232b059dc39bfca4c41469e27aba91e66 /channels/chan_dahdi.c | |
parent | b43f4a60ddf00ca242d95488bc31fd8ea7fc5b9f (diff) |
Use ast_channel_lock_both() where it was inlined before.
The CHANNEL_DEADLOCK_AVOIDANCE() feature of preserving where the channel
lock was originally obtained is overkill where ast_channel_lock_both() was
inlined.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 55a0b721d..0487d5238 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -7302,10 +7302,7 @@ static enum ast_bridge_result dahdi_bridge(struct ast_channel *c0, struct ast_ch if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1)) return AST_BRIDGE_FAILED_NOWARN; - ast_channel_lock(c0); - while (ast_channel_trylock(c1)) { - CHANNEL_DEADLOCK_AVOIDANCE(c0); - } + ast_channel_lock_both(c0, c1); p0 = ast_channel_tech_pvt(c0); p1 = ast_channel_tech_pvt(c1); @@ -7513,10 +7510,7 @@ static enum ast_bridge_result dahdi_bridge(struct ast_channel *c0, struct ast_ch /* Here's our main loop... Start by locking things, looking for private parts, and then balking if anything is wrong */ - ast_channel_lock(c0); - while (ast_channel_trylock(c1)) { - CHANNEL_DEADLOCK_AVOIDANCE(c0); - } + ast_channel_lock_both(c0, c1); p0 = ast_channel_tech_pvt(c0); p1 = ast_channel_tech_pvt(c1); |