[asterisk-dev] [Code Review] Add #includeif statement

wdoekes reviewboard at asterisk.org
Thu Nov 3 02:49:57 CDT 2011


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



trunk/main/config.c
<https://reviewboard.asterisk.org/r/1476/#comment8848>

    Whatever the final #name becomes, I'd prefer a descriptive variable:
    
    int error_if_not_found = 1;


As for the name -- I would've preferred #require vs. #include, but it's a bit late for that now ;)

The other options:

#sinclude +1
#tryinclude +.5
#includeif +0

- wdoekes


On Sept. 30, 2011, 2:56 p.m., Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1476/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2011, 2:56 p.m.)
> 
> 
> Review request for Asterisk Developers and leifmadsen.
> 
> 
> Summary
> -------
> 
> Talking with Leif on IRC today, he was asking for a way to include a config file, that might not exist all the time.  Because #include 'foo.conf' to a non existing will fail to load a module, we decided #includeif might be better.
> 
> #exec cat foo.conf is another option, however this seems to require more CPU and opens a potential security issue.
> 
> 
> Diffs
> -----
> 
>   trunk/CHANGES 338717 
>   trunk/main/config.c 338717 
> 
> Diff: https://reviewboard.asterisk.org/r/1476/diff
> 
> 
> Testing
> -------
> 
> Local development box testing.  A few more testers would be nice :D
> 
> 
> Thanks,
> 
> Paul
> 
>

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


More information about the asterisk-dev mailing list