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

David Vossel dvossel at digium.com
Tue Feb 17 17:39:08 CST 2009


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

Review request for Asterisk Developers and Russell Bryant.


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 allow will close it.


Diffs
-----

  /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