Hi,
I've got:
# define WITH_VENDOR_ROUTING_LNPOIP
at the top of my config. This is intended to mean that this constant is commented out and disabled ('# define' vs. '#!define'), and tests correctly in a given request route.
Later:
route[STAGE_3] { ...
#!ifdef WITH_VENDOR_ROUTING_LNPOIP xlog("L_INFO", "LNPOIP ENABLED STAGE 3\n"); #!else xlog("L_INFO", "LNPOIP NOT ENABLED STAGE 3\n"); #!endif
route(OUTBOUND_VENDOR_SELECT); }
This tests correctly:
Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP NOT ENABLED STAGE 3
However, in route[OUTBOUND_VENDOR_SELECT]:
#!ifdef WITH_VENDOR_ROUTING_LNPOIP xlog("L_INFO", "LNPOIP ENABLED\n"); #!else xlog("L_INFO", "LNPOIP NOT ENABLED\n"); #!endif
This prints:
Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP ENABLED Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP NOT ENABLED
... which I must admit is quite puzzling. Looks like it's both defined and not defined.
Running 4.3:16be09c here.
Thanks!
-- Alex
I traced this bizarre behaviour to an unbalanced number of ifdefs/endifs, although it's still bizarre.
On 11/08/2015 09:22 PM, Alex Balashov wrote:
Hi,
I've got:
# define WITH_VENDOR_ROUTING_LNPOIP
at the top of my config. This is intended to mean that this constant is commented out and disabled ('# define' vs. '#!define'), and tests correctly in a given request route.
Later:
route[STAGE_3] { ...
#!ifdef WITH_VENDOR_ROUTING_LNPOIP xlog("L_INFO", "LNPOIP ENABLED STAGE 3\n"); #!else xlog("L_INFO", "LNPOIP NOT ENABLED STAGE 3\n"); #!endif
route(OUTBOUND_VENDOR_SELECT);
}
This tests correctly:
Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP NOT ENABLED STAGE 3
However, in route[OUTBOUND_VENDOR_SELECT]:
#!ifdef WITH_VENDOR_ROUTING_LNPOIP xlog("L_INFO", "LNPOIP ENABLED\n"); #!else xlog("L_INFO", "LNPOIP NOT ENABLED\n"); #!endif
This prints:
Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP ENABLED Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP NOT ENABLED
... which I must admit is quite puzzling. Looks like it's both defined and not defined.
Running 4.3:16be09c here.
Thanks!
-- Alex
Hello,
for completion -- there should be a log message printed at startup when the number of ifdefs/endifs is not the same.
Cheers, Daniel
On 09/11/15 06:39, Alex Balashov wrote:
I traced this bizarre behaviour to an unbalanced number of ifdefs/endifs, although it's still bizarre.
On 11/08/2015 09:22 PM, Alex Balashov wrote:
Hi,
I've got:
# define WITH_VENDOR_ROUTING_LNPOIP
at the top of my config. This is intended to mean that this constant is commented out and disabled ('# define' vs. '#!define'), and tests correctly in a given request route.
Later:
route[STAGE_3] { ...
#!ifdef WITH_VENDOR_ROUTING_LNPOIP xlog("L_INFO", "LNPOIP ENABLED STAGE 3\n"); #!else xlog("L_INFO", "LNPOIP NOT ENABLED STAGE 3\n"); #!endif
route(OUTBOUND_VENDOR_SELECT);
}
This tests correctly:
Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP NOT ENABLED STAGE 3
However, in route[OUTBOUND_VENDOR_SELECT]:
#!ifdef WITH_VENDOR_ROUTING_LNPOIP xlog("L_INFO", "LNPOIP ENABLED\n"); #!else xlog("L_INFO", "LNPOIP NOT ENABLED\n"); #!endif
This prints:
Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP ENABLED Nov 8 21:17:54 centosity6 /usr/local/sbin/kamailio[12296]: INFO: LNPOIP NOT ENABLED
... which I must admit is quite puzzling. Looks like it's both defined and not defined.
Running 4.3:16be09c here.
Thanks!
-- Alex
On 11/09/2015 02:03 AM, Daniel-Constantin Mierla wrote:
for completion -- there should be a log message printed at startup when the number of ifdefs/endifs is not the same.
Indeed there was. That's what helped me catch it. :-)