Module: kamailio
Branch: master
Commit: ed10d7692b99b1cd6d3975c06d8b0d9d3270779d
URL:
https://github.com/kamailio/kamailio/commit/ed10d7692b99b1cd6d3975c06d8b0d9…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-09-06T11:37:44+02:00
core: improve error message related to a mismatch of #!ifdef/#!define statement
---
Modified: src/core/ppcfg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ed10d7692b99b1cd6d3975c06d8b0d9…
Patch:
https://github.com/kamailio/kamailio/commit/ed10d7692b99b1cd6d3975c06d8b0d9…
---
diff --git a/src/core/ppcfg.c b/src/core/ppcfg.c
index 3b026f9978..49065938af 100644
--- a/src/core/ppcfg.c
+++ b/src/core/ppcfg.c
@@ -219,8 +219,13 @@ void pp_ifdef_level_update(int val)
void pp_ifdef_level_check(void)
{
if(_pp_ifdef_level!=0) {
- LM_WARN("different number of preprocessor directives:"
- " N(#!IF[N]DEF) - N(#!ENDIF) = %d\n", _pp_ifdef_level);
+ if (_pp_ifdef_level > 0) {
+ LM_WARN("different number of preprocessor directives:"
+ " %d more #!if[n]def as #!endif\n", _pp_ifdef_level);
+ } else {
+ LM_WARN("different number of preprocessor directives:"
+ " %d more #!endif as #!if[n]def\n", (_pp_ifdef_level)*-1);
+ }
} else {
LM_DBG("same number of pairing preprocessor directives"
" #!IF[N]DEF - #!ENDIF\n");