[asterisk-dev] [Code Review] Refactor cdr to use configuration framework; provide configuration documentation

opticron reviewboard at asterisk.org
Thu Mar 14 09:19:07 CDT 2013


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



trunk/main/cdr.c
<https://reviewboard.asterisk.org/r/2372/#comment15414>

    To clean things up a bit, get rid of ast_default_amaflags and move the DEFAULT_AMA_FLAGS definition into the header. This appears to only be used in features.c and channel.c.



trunk/main/cdr.c
<https://reviewboard.asterisk.org/r/2372/#comment15431>

    This is unnecessary since ast_cdr_engine_term is called from finalize_batch_mode which is called from cdr_engine_shutdown which is also setup to be called at exit.  I *think* the possibility of multiple atexit registrations of ast_cdr_engine_term causing a race/segfault is mitigated by the finalize_batch_mode doing an unregistration of the atexit, but it's hard to be sure and this seems to be unnecessary complexity.


- opticron


On March 6, 2013, 9:38 p.m., Matt Jordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2372/
> -----------------------------------------------------------
> 
> (Updated March 6, 2013, 9:38 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch refactors the CDR engine to use the configuration framework. The patch also provides documentation for the CDR configuration parameters. This makes the loading of the configuration atomic, which reduces some of the shenanigans that can happen with a bad configuration file.
> 
> 
> This addresses bug ASTERISK-21196.
>     https://issues.asterisk.org/jira/browse/ASTERISK-21196
> 
> 
> Diffs
> -----
> 
>   trunk/main/cdr.c 382407 
> 
> Diff: https://reviewboard.asterisk.org/r/2372/diff
> 
> 
> Testing
> -------
> 
> Ran the CDR test suite tests. Verified that they still ran.
> 
> Loaded Asterisk:
>  * Without a cdr.conf
>  * With a bad cdr.conf
>  * With a good cdr.conf that disabled CDRs
>  * With a good cdr.conf that enabled CDRs but disabled batch mode
>  * With a good cdr.conf that enabled CDRs and enabled batch mode
> 
> Performed reloads:
>  * That disabled a previously enabled CDR engine
>  * That enabled a previously disabled CDR engine
>  * That enabled CDRs and batch mode when it previously ran in simple mode
>  * That enabled CDRs and disabled batch mode when it previously ran in batch mode
> 
> 
> Thanks,
> 
> Matt
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130314/5b4b8b5e/attachment-0001.htm>


More information about the asterisk-dev mailing list