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
This commit is contained in:
Richard Mudgett
2012-04-20 16:23:01 +00:00
parent b43f4a60dd
commit 01194c5811
5 changed files with 10 additions and 34 deletions

View File

@@ -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;