New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using undefined environmental variables with #!defenv #2967
Comments
I've forked and written a patch to add Thoughts? |
Proposed changes are in https://github.com/whosgonna/kamailio/tree/iss2967 |
As indicated by @miconda, I've refactored the keywords from |
@miconda indicated in the Kamailio mailing list that they code for |
Feature Request GH #2967 for undefined defenv Add new keywords for preprocessing: - #!trydefenv - The same as #!defenv, except if the variable is undefined, the def value will be undefined as well. - #!trydefenvs - The same as #!defenvs, except if the variable is undefined, the def value will be undefined as well.
PR was merged. |
Description
Currently, an undefined environmental variable with
#!defenv
results in Kamailio failing to start. The proposal here that if the environmental variable is not defined, then the macro value would be undefined as well. For example:Currently this configuration will fail to load if environmental variable is not set. My proposal is to either allow
#!envdef
to accept an undefined environmental variable and have the preprocessor macro undefined, or to add a new keyword (#!envdefn
perhaps?) to allow this behavior.The text was updated successfully, but these errors were encountered: