[asterisk-dev] [Code Review] Clean up cel.conf parsing

mjordan reviewboard at asterisk.org
Thu Oct 20 11:36:05 CDT 2011


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



trunk/cel/cel_manager.c
<https://reviewboard.asterisk.org/r/1436/#comment8706>

    You may not want this disabled here automatically.  This introduces a gap in time in which CEL will be disabled while the config file is being parsed through, during which any calls (such as manager_log) will fail as CEL will be disabled.
    
    The value of this should only be changed once the new configuration is completely read (or completely failed).



trunk/cel/cel_manager.c
<https://reviewboard.asterisk.org/r/1436/#comment8707>

    This will always fail, since you set enablecel to 0 previously



trunk/main/cel.c
<https://reviewboard.asterisk.org/r/1436/#comment8709>

    This lock has some issues in various places in this code.  For example, ast_cel_track_event returns the value of eventset, and is used both behind the mutex in ast_cel_report_event and outside of the mutex in ast_cel_check_retire_linkedid.
    
    The same thing is true of cel_dateformat in ast_cel_fabricate_channel_from_event
    
    Instead of having to lock / unlock all over this code, we might be better off putting all of the config options into a ref counted object and locking when we update that object.



trunk/main/cel.c
<https://reviewboard.asterisk.org/r/1436/#comment8710>

    Again, I personally think we should check for this before resetting old values.


- mjordan


On Sept. 13, 2011, 3:29 p.m., Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1436/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2011, 3:29 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This includes both [general] and [manager] sections for cel.conf.  We also no longer fail to load the module when the configuration file is missing, it will now use the defaults.
> 
> 
> Diffs
> -----
> 
>   trunk/main/cel.c 335603 
>   trunk/cel/cel_manager.c 335603 
> 
> Diff: https://reviewboard.asterisk.org/r/1436/diff
> 
> 
> Testing
> -------
> 
> local development box
> 
> 
> Thanks,
> 
> Paul
> 
>

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


More information about the asterisk-dev mailing list