summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-04-20 16:23:01 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-04-20 16:23:01 +0000
commit01194c581139eb19063700418ce2a1df0c69ef02 (patch)
tree744a7cd232b059dc39bfca4c41469e27aba91e66 /main
parentb43f4a60ddf00ca242d95488bc31fd8ea7fc5b9f (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 'main')
-rw-r--r--main/rtp_engine.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index 445026e3e..72f247f10 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -1452,12 +1452,7 @@ void ast_rtp_instance_early_bridge_make_compatible(struct ast_channel *c0, struc
int res = 0;
/* Lock both channels so we can look for the glue that binds them together */
- ast_channel_lock(c0);
- while (ast_channel_trylock(c1)) {
- ast_channel_unlock(c0);
- usleep(1);
- ast_channel_lock(c0);
- }
+ ast_channel_lock_both(c0, c1);
if (!cap1 || !cap0) {
goto done;