[asterisk-dev] [Code Review] Locking issue in action_bridge and bridge_exec

David Vossel dvossel at digium.com
Wed Feb 18 15:16:47 CST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/167/
-----------------------------------------------------------

(Updated 2009-02-18 15:16:47.349381)


Review request for Asterisk Developers and Russell Bryant.


Changes
-------

fixed russell's comments. 


Summary
-------

action_bridge() and bridge_exec() both search for the channels to bridge to, and then immediately drop the lock.  Instead, they should hold the lock until the masquerade is complete.  This will guarantee the channel remains and prevent any other weirdness from occurring.  In action_bridge() some more weirdness comes into play.  Both channels are needlessly locked at the same time and perform the exact same logic.  It makes sense from a coding organizational standpoint, but could cause a theoretical deadlock so I split the code up.  There is an issue associated with this, but since its a rather complicated thing to reproduce I'm not certain this allone will close it.


This addresses bug 0014296.
    http://bugs.digium.com/view.php?id=0014296


Diffs (updated)
-----

  /trunk/main/features.c 176358 

Diff: http://reviewboard.digium.com/r/167/diff


Testing
-------

I've executed both functions with no problems. 


Thanks,

David




More information about the asterisk-dev mailing list