Module: kamailio
Branch: master
Commit: 732eba4e8aeafe535d48c370d104406f3315f749
URL:
https://github.com/kamailio/kamailio/commit/732eba4e8aeafe535d48c370d104406…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-07-16T14:15:01+02:00
core: parser - use str cmp function directly for hdr name parsing
---
Modified: src/core/parser/parse_hname2.c
---
Diff:
https://github.com/kamailio/kamailio/commit/732eba4e8aeafe535d48c370d104406…
Patch:
https://github.com/kamailio/kamailio/commit/732eba4e8aeafe535d48c370d104406…
---
diff --git a/src/core/parser/parse_hname2.c b/src/core/parser/parse_hname2.c
index 5f610e4c81..84f8c7782f 100644
--- a/src/core/parser/parse_hname2.c
+++ b/src/core/parser/parse_hname2.c
@@ -29,7 +29,6 @@
#include <stdio.h>
#include <ctype.h>
-#include "../strutils.h"
#include "../dprint.h"
#include "parse_hname2.h"
@@ -247,7 +246,9 @@ char *parse_sip_header_name(char* const begin, const char* const end,
if(_ksr_hdr_map_idx[hdr->name.s[0]].idxs >= 0) {
for(i = _ksr_hdr_map_idx[hdr->name.s[0]].idxs;
i <= _ksr_hdr_map_idx[hdr->name.s[0]].idxe; i++) {
- if(cmp_hdrname_str(&hdr->name, &_ksr_hdr_map[i].hname) == 0) {
+ if(hdr->name.len == _ksr_hdr_map[i].hname.len
+ && strncasecmp(hdr->name.s, _ksr_hdr_map[i].hname.s,
+ hdr->name.len) == 0) {
hdr->type = _ksr_hdr_map[i].htype;
}
}