[asterisk-dev] [Code Review]: Clean up dnsmgr.conf parsing
Tilghman Lesher
reviewboard at asterisk.org
Tue Sep 13 16:09:35 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.
>
> Paul Belanger wrote:
> 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.
>
It's actually not an unfortunate collision of values. It was an intentional collision of values.
- Tilghman
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1432/#review4319
-----------------------------------------------------------
On Sept. 13, 2011, 3:09 p.m., Paul Belanger wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1432/
> -----------------------------------------------------------
>
> (Updated Sept. 13, 2011, 3:09 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Another module that requires cleanup. Also includes some coding guidelines formatting.
>
>
> Diffs
> -----
>
> trunk/main/dnsmgr.c 335603
>
> 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/c2f21249/attachment-0001.htm>
More information about the asterisk-dev
mailing list