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:
!#KAMAILIO
loadmodule "xlog"
loadmodule "pv"
#!defenv FOO
request_route {
#!ifdef FOO
xlog("L_INFO","Environmental variable $$FOO is set\n");
#!else
xlog("L_WARN","Environmental variable $$FOO is NOT set\n");
#!endif
forward();
}
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.