[sr-dev] [kamailio/kamailio] cfg parse error behaviour on a mismatch of #!ifdef/#!endif statements (#2057)

Henning Westerholt notifications at github.com
Mon Sep 9 22:05:07 CEST 2019


Thank you Daniel, the example from above works now. Unfortunately the opposite condition still not work:

> $./kamailio -c -f ../etc/test-define.cfg -Y /root
>  0(10801) CRITICAL: <core> [core/cfg.y:3532]: yyerror_at(): parse error in config file /home/henning/repositories/kamailio/src/../etc/test-define.cfg, from line 19, column 2 to line 20, column 0: syntax error
> ERROR: bad config file (1 errors)
>  0(10801) WARNING: <core> [core/ppcfg.c:223]: pp_ifdef_level_check(): different number of preprocessor directives: 1 more #!if[n]def as #!endif

```
$ cat test-define.cfg
#!KAMAILIO

#!define foo

#!ifdef foobar1
#!ifdef foobar2
#!ifdef foobar3
#!endif
#!endif

#!ifdef bar
invalid=123
#else 
children=8
#!endif

request_route {
        ;
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2057#issuecomment-529643109
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190909/f6c39ceb/attachment.html>


More information about the sr-dev mailing list