[asterisk-dev] [Code Review] 2512: Move origination to dialing API

Joshua Colp reviewboard at asterisk.org
Thu May 9 13:44:59 CDT 2013



> On May 9, 2013, 6:17 p.m., Mark Michelson wrote:
> > /trunk/main/pbx.c, lines 10248-10257
> > <https://reviewboard.asterisk.org/r/2512/diff/1/?file=37454#file37454line10248>
> >
> >     You're setting yourself up for deadlocks here by keeping the channel locked while a separate thread executes application/dialplan.
> >     
> >     Also, I don't see where the corresponding ast_channel_unlock() is (excepting when thread creation fail)
> 
> Mark Michelson wrote:
>     I now see why you don't unlock the channel, but my comment still holds about holding the channel lock while a separate thread runs.

This is... *sigh*... done to preserve the exact behavior that was present in the previous code. It's so that the caller can specifically block that thread, I wager.


> On May 9, 2013, 6:17 p.m., Mark Michelson wrote:
> > /trunk/main/pbx.c, lines 10391-10394
> > <https://reviewboard.asterisk.org/r/2512/diff/1/?file=37454#file37454line10391>
> >
> >     Consider using ast_pbx_start() instead of ast_pbx_run() here. As is, this will block the thread until the failed extension completes.

This is on purpose for when you really want to be synchronous. (ie: previous behavior being maintained). It also saves starting up another thread.


- Joshua


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2512/#review8539
-----------------------------------------------------------


On May 8, 2013, 6:52 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2512/
> -----------------------------------------------------------
> 
> (Updated May 8, 2013, 6:52 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This change adds a few minor features to the dialing API and moves origination to using it. As a result code duplication is reduced and readability has increased.
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/dial.h 388010 
>   /trunk/main/dial.c 388010 
>   /trunk/main/manager_channels.c 388010 
>   /trunk/main/pbx.c 388010 
> 
> Diff: https://reviewboard.asterisk.org/r/2512/diff/
> 
> 
> Testing
> -------
> 
> Tested various origination scenarios and confirmed they all work as expected.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130509/f3c06e44/attachment.htm>


More information about the asterisk-dev mailing list