Module: sip-router
Branch: master
Commit: 6cc5f8ec90db48483d644430bc2628356833fc1e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6cc5f8e…
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
---
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 5d60d04..e568ddb 100644
--- a/modules_k/pv/pv_trans.c
+++ b/modules_k/pv/pv_trans.c
@@ -1033,12 +1033,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;