Don't use ast_channel_lock_both() here, it only exists in one of my branches.
authorRussell Bryant <russell@russellbryant.com>
Tue, 18 Sep 2007 16:10:48 +0000 (16:10 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 18 Sep 2007 16:10:48 +0000 (16:10 +0000)
This is theoretically a potential deadlock, but it's the way it was before so
I'm going to leave it this way for now.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82776 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 262532c..e770db2 100644 (file)
@@ -3474,7 +3474,8 @@ static enum ast_bridge_result zt_bridge(struct ast_channel *c0, struct ast_chann
        if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1))
                return AST_BRIDGE_FAILED_NOWARN;
 
-       ast_channel_lock_both(c0, c1);
+       ast_channel_lock(c0);
+       ast_channel_lock(c1);
 
        p0 = c0->tech_pvt;
        p1 = c1->tech_pvt;
@@ -3640,7 +3641,8 @@ static enum ast_bridge_result zt_bridge(struct ast_channel *c0, struct ast_chann
 
                /* Here's our main loop...  Start by locking things, looking for private parts, 
                   and then balking if anything is wrong */
-               ast_channel_lock_both(c0, c1);
+               ast_channel_lock(c0);
+               ast_channel_lock(c1);
 
                p0 = c0->tech_pvt;
                p1 = c1->tech_pvt;