[sr-dev] git:master:70c38551: textops: remove_hf_match() returns true when a header is removed

Daniel-Constantin Mierla miconda at gmail.com
Fri Mar 11 13:22:27 CET 2022


Module: kamailio
Branch: master
Commit: 70c385518829d07b2061678af4e2d7f21587e454
URL: https://github.com/kamailio/kamailio/commit/70c385518829d07b2061678af4e2d7f21587e454

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-03-11T13:21:48+01:00

textops: remove_hf_match() returns true when a header is removed

---

Modified: src/modules/textops/textops.c

---

Diff:  https://github.com/kamailio/kamailio/commit/70c385518829d07b2061678af4e2d7f21587e454.diff
Patch: https://github.com/kamailio/kamailio/commit/70c385518829d07b2061678af4e2d7f21587e454.patch

---

diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c
index e47e7b65d1..e4de8600d2 100644
--- a/src/modules/textops/textops.c
+++ b/src/modules/textops/textops.c
@@ -2243,7 +2243,7 @@ static int ki_remove_hf_match(sip_msg_t* msg, str* hname, str *op, str *expr)
 	regex_t mre;
 	regmatch_t pmatch;
 	char c;
-	int ret = -1;
+	int ret = -2;
 
 	memset(&mre, 0, sizeof(regex_t));
 
@@ -2330,9 +2330,6 @@ static int ki_remove_hf_match(sip_msg_t* msg, str* hname, str *op, str *expr)
 			ret = 1;
 		}
 	}
-	if(ret==-1) {
-		ret = 2;
-	}
 
 done:
 	if(vop==4) {




More information about the sr-dev mailing list