Module: kamailio
Branch: master
Commit: ed10d7692b99b1cd6d3975c06d8b0d9d3270779d
URL: 
https://github.com/kamailio/kamailio/commit/ed10d7692b99b1cd6d3975c06d8b0d9d3270779d

Author: Henning Westerholt <[email protected]>
Committer: Henning Westerholt <[email protected]>
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/ed10d7692b99b1cd6d3975c06d8b0d9d3270779d.diff
Patch: 
https://github.com/kamailio/kamailio/commit/ed10d7692b99b1cd6d3975c06d8b0d9d3270779d.patch

---

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");


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to