Module: kamailio
Branch: 5.4
Commit: 5e39061818a0d52ac3a692c6357a497a09207e87
URL:
https://github.com/kamailio/kamailio/commit/5e39061818a0d52ac3a692c6357a497…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-07-29T10:44:42+02:00
pv: test for HDR_ERROR_T after header name parsing
(cherry picked from commit c264fbc66a4690b073c72ffa8fc095227ce0ae8b)
(cherry picked from commit 18e85c98bb6eebf9afe83aaa0a832d1c4af46e62)
---
Modified: src/modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5e39061818a0d52ac3a692c6357a497…
Patch:
https://github.com/kamailio/kamailio/commit/5e39061818a0d52ac3a692c6357a497…
---
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 6d793185dc..c07096c240 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -3248,8 +3248,8 @@ int pv_parse_hdr_name(pv_spec_p sp, str *in)
s.s = p;
s.len = in->len+1;
- if (parse_hname2_short(s.s, s.s + s.len, &hdr)==0)
- {
+ parse_hname2_short(s.s, s.s + s.len, &hdr);
+ if(hdr.type==HDR_ERROR_T) {
LM_ERR("error parsing header name [%.*s]\n", s.len, s.s);
goto error;
}