Module: kamailio
Branch: 5.1
Commit: a9fb58a83ec8738a371d6be995d457b88e16a2f4
URL:
https://github.com/kamailio/kamailio/commit/a9fb58a83ec8738a371d6be995d457b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-04-04T12:58:21+02:00
dialog: parse tm callback reply in early phase to detect broken format
(cherry picked from commit 6b9837c30f9d2a2ca937d7e6d8c1c496fe4d7d30)
(cherry picked from commit c2995f731ab3a94f302af63bdad9c3bf61d4e995)
---
Modified: src/modules/dialog/dlg_handlers.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a9fb58a83ec8738a371d6be995d457b…
Patch:
https://github.com/kamailio/kamailio/commit/a9fb58a83ec8738a371d6be995d457b…
---
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c
index c80ca7d59f..a2f50b7e3e 100644
--- a/src/modules/dialog/dlg_handlers.c
+++ b/src/modules/dialog/dlg_handlers.c
@@ -438,6 +438,13 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params
*param)
if(dlg==0)
return;
+ if (rpl != FAKED_REPLY) {
+ if(parse_headers(rpl, HDR_EOH_F, 0) < 0) {
+ LM_ERR("failed to parse the reply headers\n");
+ goto done_early;
+ }
+ }
+
unref = 0;
if (type & (TMCB_RESPONSE_IN|TMCB_ON_FAILURE)) {
/* Set the dialog context so it is available in onreply_route and failure_route*/