[sr-dev] git:master:bb494b5d: core: ppcfg - debug messagee with result of snexpr evaluation

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 14 18:32:09 CEST 2022


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-09-14T18:31:59+02:00

core: ppcfg - debug messagee with result of snexpr evaluation

---

Modified: src/core/ppcfg.c

---

Diff:  https://github.com/kamailio/kamailio/commit/bb494b5d2dc4690c7389a3000ff8fda4ce3aeaa8.diff
Patch: https://github.com/kamailio/kamailio/commit/bb494b5d2dc4690c7389a3000ff8fda4ce3aeaa8.patch

---

diff --git a/src/core/ppcfg.c b/src/core/ppcfg.c
index 49f16aaa6f..895855df38 100644
--- a/src/core/ppcfg.c
+++ b/src/core/ppcfg.c
@@ -434,6 +434,7 @@ void pp_ifexp_eval(char *exval, int exlen)
 	}
 
 	if(result->type == SNE_OP_CONSTNUM) {
+		LM_DBG("expression number result: %g\n", result->param.num.nval);
 		if(result->param.num.nval) {
 			b = 1;
 		} else {
@@ -441,8 +442,11 @@ void pp_ifexp_eval(char *exval, int exlen)
 		}
 	} else if(result->type == SNE_OP_CONSTSTZ) {
 		if(result->param.stz.sval==NULL || strlen(result->param.stz.sval)==0) {
+			LM_DBG("expression string result: <%s>\n",
+					(result->param.stz.sval)?"empty":"null");
 			b = 0;
 		} else {
+			LM_DBG("expression string result: [%s]\n", result->param.stz.sval);
 			b = 1;
 		}
 	}




More information about the sr-dev mailing list