[sr-dev] git:master:f151c26b: pv: fix for param.count transformation with pv parameter

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 28 15:39:26 CEST 2017


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-03-28T15:37:59+02:00

pv: fix for param.count transformation with pv parameter

- reported by GH #1041

---

Modified: src/modules/pv/pv_trans.c

---

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

---

diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c
index 70c684a..f15975e 100644
--- a/src/modules/pv/pv_trans.c
+++ b/src/modules/pv/pv_trans.c
@@ -2662,13 +2662,13 @@ char* tr_parse_paramlist(str* in, trans_t *t)
 			start_pos = ++p;
 			_tr_parse_sparam(p, p0, tp, spec, ps, in, s);
 			t->params = tp;
-			tp = 0;
-			if (p - start_pos != 1)
+			if (tp->type != TR_PARAM_SPEC && p - start_pos != 1)
 			{
 				LM_ERR("invalid separator in transformation: "
 						"%.*s\n", in->len, in->s);
 				goto error;
 			}
+			tp = 0;
 
 			while(*p && (*p==' ' || *p=='\t' || *p=='\n')) p++;
 			if(*p!=TR_RBRACKET)




More information about the sr-dev mailing list