diff options
author | Mark Spencer <markster@digium.com> | 2004-08-31 21:55:19 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-08-31 21:55:19 +0000 |
commit | 0c39d6de8e553baeb26841eaddb66d2079c76379 (patch) | |
tree | 84ccc92bb0b806b60c8199433e96d35e4e63c745 /rtp.c | |
parent | 53262335c88d23509d299cd48ff2a3b494d90dbd (diff) |
Grab each lock individually...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rtp.c')
-rwxr-xr-x | rtp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1327,7 +1327,11 @@ int ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, st if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1)) return -2; ast_mutex_lock(&c0->lock); - ast_mutex_lock(&c1->lock); + while(ast_mutex_trylock(&c1->lock)) { + ast_mutex_unlock(&c0->lock); + usleep(1); + ast_mutex_lock(&c0->lock); + } pr0 = get_proto(c0); pr1 = get_proto(c1); if (!pr0) { |