Module: kamailio Branch: 5.3 Commit: 4ba9945e26199b5a64b2e5cd02062ef9f866ac1a URL: https://github.com/kamailio/kamailio/commit/4ba9945e26199b5a64b2e5cd02062ef9...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-12-06T14:41:03+01:00
core: parse main headers after updating msg buffer
- same group of headers as for the case of receiving the message - applies for msg_apply_changes() as well - related to GH #2877
(cherry picked from commit d5c1b4693b6e47b4123b5f9417b5fd88d4dafd1f) (cherry picked from commit 992c5a349454e40c87c8918283ffde7302da9d8e) (cherry picked from commit 49f3ec66c9e187584f403ca19e3b436abd20376a)
---
Modified: src/core/msg_translator.c
---
Diff: https://github.com/kamailio/kamailio/commit/4ba9945e26199b5a64b2e5cd02062ef9... Patch: https://github.com/kamailio/kamailio/commit/4ba9945e26199b5a64b2e5cd02062ef9...
---
diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c index bb8d60c1ce..cc9943fe74 100644 --- a/src/core/msg_translator.c +++ b/src/core/msg_translator.c @@ -3284,7 +3284,13 @@ int sip_msg_update_buffer(sip_msg_t *msg, str *obuf) * valid/safe for config */ return 0; } - + if(parse_headers(msg, HDR_FROM_F|HDR_TO_F|HDR_CALLID_F|HDR_CSEQ_F, 0) < 0) { + LM_ERR("parsing main headers of new sip message failed [[%.*s]]\n", + msg->len, msg->buf); + /* exit config execution - sip_msg_t structure is no longer + * valid/safe for config */ + return 0; + } return 1; }