[asterisk-dev] [Code Review] IAX timer not loading

Russell Bryant russell at digium.com
Fri May 29 16:17:39 CDT 2009


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


This is a tricky situation.  :-)

One thing with this patch is that while it prevents the code from accepting trunked calls before Asterisk fully starts, it will not prevent Asterisk from starting up outbound trunked calls.  So, there is still some potential for failure here.

The only things that I can think of that would make this work make the patch even more complicated and module initialization even more bizarre.

I am really liking just patching the loader to force timing modules to get preloaded.  My current suggestion is to write a new patch that goes that route, and then we'll see what comments show up on the code review.  It seems like a reasonable thing to let modules assume that fundamental subsystems, such as the timing interface, are fully initialized before they get loaded.  Otherwise, the code is really going to get ugly.

- Russell


On 2009-05-28 09:57:40, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/262/
> -----------------------------------------------------------
> 
> (Updated 2009-05-28 09:57:40)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> When loading chan_iax2, a timer is opened.  If this timer fails to open trunk peers/users may not be built correctly.  Depending on the order Asterisk loads modules, the timer may or may not be loaded before chan_iax2.  If it is not loaded before hand, trunk peers/users will not be set up even though a timing interface may be possible.  This patch waits until Asterisk is fully booted to create the timer.  If the timer fails, all trunked peers/users' IAX_TRUNK flags are cleared and a warning message appears.
> 
> 
> This addresses bug 15191.
>     https://issues.asterisk.org/view.php?id=15191
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_iax2.c 197192 
> 
> Diff: http://reviewboard.digium.com/r/262/diff
> 
> 
> Testing
> -------
> 
> tested with and without loading the timer module. worked correctly.
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list