MT#58408 pv_headers: don't fallback to Request headers at Replay msg

Change-Id: I029fb531522239bb92d5ffb95d23e13feeb42640
(cherry picked from commit 2a57d3ec54)
(cherry picked from commit 0276111198)
(cherry picked from commit ab3441ca95)
(cherry picked from commit f9c4009540)
mr10.5.5
Victor Seva 3 years ago
parent 474487e8b4
commit 7b050f5dd1

@ -57,6 +57,7 @@ sipwise/kamctl-TMPDIR-config.patch
sipwise/lcr-stopper_mode-parameter.patch
sipwise/dialog-support-profile_get_size-for-all-profiles.patch
sipwise/dialog-dlg_set_var-support-empty-totag-param.patch
sipwise/pv_headers-pvh_xavi_get_child-fix-fallback-logic.patch
### active development
upstream/tm-new-inter-module-API-function-t_find.patch
upstream/pv_headers-use-tm.t_find-API.patch

@ -0,0 +1,22 @@
From: Victor Seva <vseva@sipwise.com>
Date: Mon, 23 Oct 2023 14:36:49 +0200
Subject: pv_headers: pvh_xavi_get_child() fix fallback logic
* don't fallback to Initial request headers for Replies
---
src/modules/pv_headers/pvh_xavp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/pv_headers/pvh_xavp.c b/src/modules/pv_headers/pvh_xavp.c
index 3bc32d2..bb5f950 100644
--- a/src/modules/pv_headers/pvh_xavp.c
+++ b/src/modules/pv_headers/pvh_xavp.c
@@ -284,7 +284,7 @@ sr_xavp_t *pvh_xavi_get_child(struct sip_msg *msg, str *xname, str *name)
pvh_get_branch_xname(msg, xname, &br_xname);
xavi = xavi_get_child(&br_xname, name);
- if(xavi == NULL) {
+ if(xavi == NULL && msg->first_line.type == SIP_REQUEST) {
if(cmp_str(xname, &br_xname) != 0) {
xavi = xavi_get_child(xname, name);
if(xavi) {
Loading…
Cancel
Save