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

Paul Belanger reviewboard at asterisk.org
Tue Sep 13 14:52:56 CDT 2011



> On Sept. 13, 2011, 2:04 p.m., rmudgett wrote:
> > trunk/main/dnsmgr.c, lines 392-395
> > <https://reviewboard.asterisk.org/r/1432/diff/1/?file=20564#file20564line392>
> >
> >     Checking for config == NULL here should be done to abort the config load.  Config can be NULL if ast_config_load2() fails to allocate the structure config represents.
> 
> Tilghman Lesher wrote:
>     It already is:
>     #define CONFIG_STATUS_FILEMISSING   (void *)0
> 
> rmudgett wrote:
>     That is an unfortunate collision of values.  NULL is returned for other reasons than file missing.

Right, we just looked at that a few minutes ago.  I listed this in another review, but as a follow up. We should be:

ast_config_load2()
checking FILEUNCHANGED, if yes return
setup_default values
checking FILEMISSING or FILEINVALID, if yes return
parse config
???
profit.

And actually, this file would need to be updated for that.


- Paul


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


On Sept. 12, 2011, 7:26 p.m., Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1432/
> -----------------------------------------------------------
> 
> (Updated Sept. 12, 2011, 7:26 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Another module that requires cleanup.  Also includes some coding guidelines formatting.
> 
> 
> Diffs
> -----
> 
>   trunk/main/dnsmgr.c 335386 
> 
> Diff: https://reviewboard.asterisk.org/r/1432/diff
> 
> 
> Testing
> -------
> 
> local development box.
> 
> 
> Thanks,
> 
> Paul
> 
>

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


More information about the asterisk-dev mailing list