diff --git a/debian/patches/series b/debian/patches/series index 17d55066d..be0d05a40 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -35,6 +35,8 @@ sipwise/sca-add-pai_avp-parameter.patch # https://github.com/kamailio/kamailio/pull/979 # collides with our changes to pua_dialoginfo sipwise/Revert-pua_dialoginfo-disable-publish-notifications-.patch +## upstream master +upstream/pv_headers-fix-removal-of-all-values-on-when-using-P.patch ### relevant for upstream sipwise/pua_dialoginfo-refresh_pubruri_avps_flag.patch sipwise/pua_dialoginfo-local_identity_dlg_var.patch diff --git a/debian/patches/upstream/pv_headers-fix-removal-of-all-values-on-when-using-P.patch b/debian/patches/upstream/pv_headers-fix-removal-of-all-values-on-when-using-P.patch new file mode 100644 index 000000000..7980c63aa --- /dev/null +++ b/debian/patches/upstream/pv_headers-fix-removal-of-all-values-on-when-using-P.patch @@ -0,0 +1,35 @@ +From: Victor Seva +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); + }