[sr-dev] git:master:7f95cd20: pv: debug messages when setting shv via rpc

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 28 17:58:08 CET 2020


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-02-28T17:57:41+01:00

pv: debug messages when setting shv via rpc

---

Modified: src/modules/pv/pv_shv.c

---

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

---

diff --git a/src/modules/pv/pv_shv.c b/src/modules/pv/pv_shv.c
index 1f472664d7..fb4de51114 100644
--- a/src/modules/pv/pv_shv.c
+++ b/src/modules/pv/pv_shv.c
@@ -546,8 +546,9 @@ void rpc_shv_set(rpc_t* rpc, void* c)
 		if (rpc->scan(c, "d", &ival) != 1) {
 			rpc->fault(c, 500, "Missing integer parameter value (Parameters: varname type value)");
 			return;
-	}
+		}
 		isv.n = ival;
+		LM_DBG("setting %.*s to int %d\n", varname.len, varname.s, ival);
 	} else  if (strcasecmp(type.s, "str") == 0 ) {
 		/* String value */
 		if (rpc->scan(c, "S", &value) != 1) {
@@ -556,6 +557,8 @@ void rpc_shv_set(rpc_t* rpc, void* c)
 		}
 		isv.s = value;
 		flags = VAR_VAL_STR;
+		LM_DBG("setting %.*s to str %.*s\n", varname.len, varname.s,
+				value.len, value.s);
 	} else {
 		rpc->fault(c, 500, "Unknown parameter type (Types: int or str)");
 		return;




More information about the sr-dev mailing list