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

Paul Belanger reviewboard at asterisk.org
Mon Jan 2 10:47:12 CST 2012



> On Sept. 24, 2011, 3:16 a.m., wdoekes wrote:
> > trunk/main/logger.c, lines 67-87
> > <https://reviewboard.asterisk.org/r/1457/diff/2/?file=20885#file20885line67>
> >
> >     According to the reset-defaults-between-UNCHANGED-and-FILEMISSING logic, these defaults shouldn't be set here, but there.

Check it out


> On Sept. 24, 2011, 3:16 a.m., wdoekes wrote:
> > trunk/main/logger.c, lines 332-333
> > <https://reviewboard.asterisk.org/r/1457/diff/2/?file=20885#file20885line332>
> >
> >     Shouldn't these two be after the "if no config file...set default options"? And the add the other stuff from above.

No, now the other modules had it is

Check CONFIG_STATUS_FILEUNCHANGED, if yes return
reset default setting
Check CONFIG_STATUS_FILEMISSING or CONFIG_STATUS_FILEINVALID, if yes return
???
profit


So, after we know the configuration file has changed, we _should_ be resetting the values back to their default.  So if the file is missing or invalid, we have at least have the default values set.


> On Sept. 24, 2011, 3:16 a.m., wdoekes wrote:
> > trunk/main/logger.c, lines 369-370
> > <https://reviewboard.asterisk.org/r/1457/diff/2/?file=20885#file20885line369>
> >
> >     s/"unknown"/ast_config_AST_SYSTEM_NAME/
> >     
> >     and
> >     
> >     s/fprintf/ast_log(LOG_ERROR)/
> >     
> >     (same behaviour as the asterisk.conf)

ACK'd


- Paul


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


On Sept. 23, 2011, 2:30 p.m., Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1457/
> -----------------------------------------------------------
> 
> (Updated Sept. 23, 2011, 2:30 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch helps clean up logger.conf for parsing of the [general] section.
> 
> 
> Diffs
> -----
> 
>   trunk/main/logger.c 337894 
> 
> Diff: https://reviewboard.asterisk.org/r/1457/diff
> 
> 
> Testing
> -------
> 
> local development box
> 
> 
> Thanks,
> 
> Paul
> 
>

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


More information about the asterisk-dev mailing list