Grab each lock individually...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3701 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
b9b32e3172
commit
6750fc777d
6
rtp.c
6
rtp.c
|
@ -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))
|
if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1))
|
||||||
return -2;
|
return -2;
|
||||||
ast_mutex_lock(&c0->lock);
|
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);
|
pr0 = get_proto(c0);
|
||||||
pr1 = get_proto(c1);
|
pr1 = get_proto(c1);
|
||||||
if (!pr0) {
|
if (!pr0) {
|
||||||
|
|
Reference in New Issue