Module: sip-router
Branch: kamailio_3.0
Commit: 2e9f1eee444bc4937a4de4be24343ac5cccb2c6e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2e9f1ee…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Jul 30 20:15:13 2010 +0200
pv: fixed tobody.params transformation
- len was wrong when having quoted parameters
- patch by Alex Hermann, closes SF#3035382
(cherry picked from commit 6cc5f8ec90db48483d644430bc2628356833fc1e)
---
modules_k/pv/pv_trans.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/modules_k/pv/pv_trans.c b/modules_k/pv/pv_trans.c
index f8e7347..939d8de 100644
--- a/modules_k/pv/pv_trans.c
+++ b/modules_k/pv/pv_trans.c
@@ -996,12 +996,8 @@ int tr_eval_tobody(struct sip_msg *msg, tr_param_t *tp, int subtype,
if(_tr_tobody.param_lst!=NULL)
{
val->rs.s = _tr_tobody.param_lst->name.s;
- if(_tr_tobody.last_param->value.s!=NULL)
- val->rs.len = _tr_tobody.last_param->value.s
- +_tr_tobody.last_param->value.len - val->rs.s;
- else
- val->rs.len = _tr_tobody.last_param->name.s
- +_tr_tobody.last_param->name.len - val->rs.s;
+ val->rs.len = _tr_tobody_str.s + _tr_tobody_str.len
+ - val->rs.s;
} else val->rs = _tr_empty;
break;