Module: kamailio
Branch: master
Commit: 6b9837c30f9d2a2ca937d7e6d8c1c496fe4d7d30
URL: 
https://github.com/kamailio/kamailio/commit/6b9837c30f9d2a2ca937d7e6d8c1c496fe4d7d30

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2019-03-22T04:17:23+01:00

dialog: parse tm callback reply in early phase to detect broken format

---

Modified: src/modules/dialog/dlg_handlers.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6b9837c30f9d2a2ca937d7e6d8c1c496fe4d7d30.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6b9837c30f9d2a2ca937d7e6d8c1c496fe4d7d30.patch

---

diff --git a/src/modules/dialog/dlg_handlers.c 
b/src/modules/dialog/dlg_handlers.c
index a52b62805b..80389a3446 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*/


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to