Browse code

pv: test for HDR_ERROR_T after header name parsing

Daniel-Constantin Mierla authored on 03/06/2021 13:29:50
Showing 1 changed files
... ...
@@ -3501,8 +3501,8 @@ int pv_parse_hdr_name(pv_spec_p sp, str *in)
3501 3501
 	s.s = p;
3502 3502
 	s.len = in->len+1;
3503 3503
 
3504
-	if (parse_hname2_short(s.s, s.s + s.len, &hdr)==0)
3505
-	{
3504
+	parse_hname2_short(s.s, s.s + s.len, &hdr);
3505
+	if(hdr.type==HDR_ERROR_T) {
3506 3506
 		LM_ERR("error parsing header name [%.*s]\n", s.len, s.s);
3507 3507
 		goto error;
3508 3508
 	}