Module: sip-router
Branch: kamailio_3.0
Commit: a1b15f1289db84bdf8e3da11fa33af9ae0501f3c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a1b15f1…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Dec 14 13:00:07 2009 +0100
core: fix parsing for avps with the same name as a pv class
When a pv lookup fails, sometimes the pvspec is partially filled
which, if not clean might mess-up the avp flags in the lval union.
E.g.: $avp="..." caused problems (avp was marked as RE name).
---
cfg.y | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/cfg.y b/cfg.y
index 2c488a2..0062b0e 100644
--- a/cfg.y
+++ b/cfg.y
@@ -2435,6 +2435,10 @@ avp_pvar: AVP_OR_PVAR {
s_tmp.s=$1; s_tmp.len=strlen(s_tmp.s);
if (pv_parse_spec2(&s_tmp, &lval_tmp->lv.pvs, 1)==0){
/* not a pvar, try avps */
+ /* lval_tmp might be partially filled by the failed
+ pv_parse_spec2() (especially if the avp name is the
+ same as a pv class) => clean it again */
+ memset(lval_tmp, 0, sizeof(*lval_tmp));
lval_tmp->lv.avps.type|= AVP_NAME_STR;
lval_tmp->lv.avps.name.s.s = s_tmp.s+1;
lval_tmp->lv.avps.name.s.len = s_tmp.len-1;
Module: sip-router
Branch: sr_3.0
Commit: 9354d82c043b0fef64ad671505071ce64fc501b4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9354d82…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Dec 14 13:00:07 2009 +0100
core: fix parsing for avps with the same name as a pv class
When a pv lookup fails, sometimes the pvspec is partially filled
which, if not clean might mess-up the avp flags in the lval union.
E.g.: $avp="..." caused problems (avp was marked as RE name).
---
cfg.y | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/cfg.y b/cfg.y
index bfe45e4..234b2d0 100644
--- a/cfg.y
+++ b/cfg.y
@@ -2435,6 +2435,10 @@ avp_pvar: AVP_OR_PVAR {
s_tmp.s=$1; s_tmp.len=strlen(s_tmp.s);
if (pv_parse_spec2(&s_tmp, &lval_tmp->lv.pvs, 1)==0){
/* not a pvar, try avps */
+ /* lval_tmp might be partially filled by the failed
+ pv_parse_spec2() (especially if the avp name is the
+ same as a pv class) => clean it again */
+ memset(lval_tmp, 0, sizeof(*lval_tmp));
lval_tmp->lv.avps.type|= AVP_NAME_STR;
lval_tmp->lv.avps.name.s.s = s_tmp.s+1;
lval_tmp->lv.avps.name.s.len = s_tmp.len-1;
Hello,
I plan to release Kamailio 3.0, hopefully today, if no outstanding issue
out there. Ending of last week, I managed to get debian packaging
working (tested on Ubuntu) using Andrei's new Makefile system, with
module groups.
If you are aware of issues you want fixed before 3.0RC3, drop an email.
This is supposed to be latest RC before full 3.0.0 release.
Cheers,
Daniel
--
Daniel-Constantin Mierla
* http://www.asipto.com/