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

Olle E. Johansson oej at edvina.net
Fri Sep 30 15:21:15 CDT 2011


30 sep 2011 kl. 21:56 skrev Paul Belanger:

> 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.
> 
This is possible today by including a directory. If the file exists, it will be included.

I don't think we should make it more complicated with new directives.

/O


More information about the asterisk-dev mailing list