mirror of https://github.com/sipwise/kamailio.git
$(x_hdr(whatever)[*]) = "hello" was just removing the first value Change-Id: Ia2900af78bc88f2853638cd13aa3cf1c17559b2dmr10.0
parent
d7d2897642
commit
06be05d4fb
@ -0,0 +1,35 @@
|
||||
From: Victor Seva <vseva@sipwise.com>
|
||||
Date: Fri, 23 Jul 2021 15:56:11 +0200
|
||||
Subject: pv_headers: fix removal of all values on when using PV_IDX_ALL
|
||||
|
||||
$(x_hdr(whatever)[*]) = "hello" was just removing the first value
|
||||
|
||||
Change-Id: Icc170673aef64e335ef82d940b6b85c940dbde55
|
||||
|
||||
Change-Id: I3614396eccbbf616b1c53f8511c2a7b42e8ef2df
|
||||
---
|
||||
src/modules/pv_headers/pvh_xavp.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/modules/pv_headers/pvh_xavp.c b/src/modules/pv_headers/pvh_xavp.c
|
||||
index 7cba757..96fdc29 100644
|
||||
--- a/src/modules/pv_headers/pvh_xavp.c
|
||||
+++ b/src/modules/pv_headers/pvh_xavp.c
|
||||
@@ -618,7 +618,7 @@ int pvh_set_header(
|
||||
|
||||
if(val == NULL || (val->flags & PV_VAL_NULL)) {
|
||||
if(idxf == PV_IDX_ALL) {
|
||||
- cnt = xavi_rm_by_name(hname, 1, &xavi);
|
||||
+ cnt = xavi_rm_by_name(hname, 1, &avi);
|
||||
LM_DBG("removed %d values of %.*s=>%.*s, set $null\n", cnt,
|
||||
xavi->name.len, xavi->name.s, hname->len, hname->s);
|
||||
if(pvh_set_xavi(msg, &xavi_name, hname, NULL, SR_XTYPE_NULL, 0, 0)
|
||||
@@ -649,7 +649,7 @@ int pvh_set_header(
|
||||
goto err;
|
||||
} else if(idxf == PV_IDX_ALL) {
|
||||
if(hname_cnt > 1) {
|
||||
- cnt = xavi_rm_by_name(hname, 1, &xavi);
|
||||
+ cnt = xavi_rm_by_name(hname, 1, &avi);
|
||||
LM_DBG("removed %d values of %.*s=>%.*s\n", cnt, xavi->name.len,
|
||||
xavi->name.s, hname->len, hname->s);
|
||||
}
|
||||
Loading…
Reference in new issue