Browse code

core: parser - use str cmp function directly for hdr name parsing

Daniel-Constantin Mierla authored on 16/07/2020 12:15:01
Showing 1 changed files
... ...
@@ -29,7 +29,6 @@
29 29
 #include <stdio.h>
30 30
 #include <ctype.h>
31 31
 
32
-#include "../strutils.h"
33 32
 #include "../dprint.h"
34 33
 
35 34
 #include "parse_hname2.h"
... ...
@@ -247,7 +246,9 @@ done:
247 246
 	if(_ksr_hdr_map_idx[hdr->name.s[0]].idxs >= 0) {
248 247
 		for(i = _ksr_hdr_map_idx[hdr->name.s[0]].idxs;
249 248
 					i <= _ksr_hdr_map_idx[hdr->name.s[0]].idxe; i++) {
250
-			if(cmp_hdrname_str(&hdr->name, &_ksr_hdr_map[i].hname) == 0) {
249
+			if(hdr->name.len == _ksr_hdr_map[i].hname.len
250
+					&& strncasecmp(hdr->name.s, _ksr_hdr_map[i].hname.s,
251
+							hdr->name.len) == 0) {
251 252
 				hdr->type = _ksr_hdr_map[i].htype;
252 253
 			}
253 254
 		}