mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user