[sr-dev] git:master:e9cdbdfa: textops: fixed condition on header parsing error for find_hdr_line_start()

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 15 10:40:05 CEST 2021


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-15T10:39:09+02:00

textops: fixed condition on header parsing error for find_hdr_line_start()

---

Modified: src/modules/textops/textops.c

---

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

---

diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c
index 75a00f16a8..b2ad856cfc 100644
--- a/src/modules/textops/textops.c
+++ b/src/modules/textops/textops.c
@@ -1612,8 +1612,8 @@ static inline int find_hdr_line_start(char *hname, unsigned int hname_len,
 	start = *buf;
 	len = *buf_len;
 	parse_hname2_str(&sname, &h1);
-	if(h1.type!=HDR_ERROR_T) {
-		LM_ERR("not a header name: %.*s\n", hname_len, hname);
+	if(h1.type==HDR_ERROR_T) {
+		LM_ERR("failed to parse header name: '%.*s'\n", hname_len, hname);
 		return 0;
 	}
 




More information about the sr-dev mailing list