Browse code

pv: test for HDR_ERROR_T after header name parsing

(cherry picked from commit c264fbc66a4690b073c72ffa8fc095227ce0ae8b)

Daniel-Constantin Mierla authored on 03/06/2021 13:29:50
Showing 1 changed files
... ...
@@ -3274,8 +3274,8 @@ int pv_parse_hdr_name(pv_spec_p sp, str *in)
3274 3274
 	s.s = p;
3275 3275
 	s.len = in->len+1;
3276 3276
 
3277
-	if (parse_hname2_short(s.s, s.s + s.len, &hdr)==0)
3278
-	{
3277
+	parse_hname2_short(s.s, s.s + s.len, &hdr);
3278
+	if(hdr.type==HDR_ERROR_T) {
3279 3279
 		LM_ERR("error parsing header name [%.*s]\n", s.len, s.s);
3280 3280
 		goto error;
3281 3281
 	}