mirror of https://github.com/sipwise/kamailio.git
upstream patch was wrong function was wrongly removed Change-Id: I57bb16815a0bfefe1356100c7056c5fae4c9bef9mr10.3
parent
48ff199bc5
commit
1927c059cc
@ -0,0 +1,41 @@
|
||||
From b42dfd30ba74562e3c7673b3de449760bb315d62 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Seva <linuxmaniac@torreviejawireless.org>
|
||||
Date: Wed, 22 Dec 2021 11:19:19 +0100
|
||||
Subject: [PATCH] pv_headers: restore pvh_real_hdr_del_by_name()
|
||||
|
||||
it was wrongly removed at 09981c41cb6685fa18f61b9e7d66339917c4f097
|
||||
|
||||
(cherry picked from commit d8f0e71a0497e0bb98be60452914df51c84b56d8)
|
||||
---
|
||||
src/modules/pv_headers/pvh_hdr.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/src/modules/pv_headers/pvh_hdr.c b/src/modules/pv_headers/pvh_hdr.c
|
||||
index 31c09b4b5d..fbb471ccd5 100644
|
||||
--- a/src/modules/pv_headers/pvh_hdr.c
|
||||
+++ b/src/modules/pv_headers/pvh_hdr.c
|
||||
@@ -131,6 +131,21 @@ int pvh_real_hdr_append(struct sip_msg *msg, str *hname, str *hvalue)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+int pvh_real_hdr_del_by_name(struct sip_msg *msg, str *hname)
|
||||
+{
|
||||
+ hdr_field_t *hf = NULL;
|
||||
+
|
||||
+ for(hf = msg->headers; hf; hf = hf->next) {
|
||||
+ if(hf->name.len == hname->len
|
||||
+ && strncasecmp(hf->name.s, hname->s, hname->len) == 0) {
|
||||
+ LM_DBG("remove header[%.*s]: %.*s\n", hf->name.len, hf->name.s,
|
||||
+ hf->body.len, hf->body.s);
|
||||
+ del_lump(msg, hf->name.s - msg->buf, hf->len, 0);
|
||||
+ }
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
int pvh_real_hdr_remove_display(struct sip_msg *msg, str *hname)
|
||||
{
|
||||
hdr_field_t *hf = NULL;
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Loading…
Reference in new issue