Module: kamailio
Branch: 5.2
Commit: b4df4fc4b0401b522b7fce516e286aec85d4ad96
URL:
https://github.com/kamailio/kamailio/commit/b4df4fc4b0401b522b7fce516e286ae…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-04-04T12:57:10+02:00
dialog: parse headers for request and transfer reply for errors
(cherry picked from commit 4e1ebc6b446e6264f91c96deaed0548de353d731)
---
Modified: src/modules/dialog/dlg_handlers.c
Modified: src/modules/dialog/dlg_transfer.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b4df4fc4b0401b522b7fce516e286ae…
Patch:
https://github.com/kamailio/kamailio/commit/b4df4fc4b0401b522b7fce516e286ae…
---
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c
index 80389a3446..7e8d72b6c7 100644
--- a/src/modules/dialog/dlg_handlers.c
+++ b/src/modules/dialog/dlg_handlers.c
@@ -852,6 +852,11 @@ int dlg_new_dialog(sip_msg_t *req, struct cell *t, const int
run_initial_cbs)
if(req->first_line.u.request.method_value != METHOD_INVITE)
return -1;
+ if(parse_headers(req, HDR_EOH_F, 0) < 0) {
+ LM_ERR("failed to parse the request headers\n");
+ return -1;
+ }
+
if(pre_match_parse( req, &callid, &ftag, &ttag, 0)<0) {
LM_WARN("pre-matching failed\n");
return -1;
diff --git a/src/modules/dialog/dlg_transfer.c b/src/modules/dialog/dlg_transfer.c
index f3e594bcbe..a920eb52c1 100644
--- a/src/modules/dialog/dlg_transfer.c
+++ b/src/modules/dialog/dlg_transfer.c
@@ -252,6 +252,10 @@ void dlg_bridge_tm_callback(struct cell *t, int type, struct
tmcb_params *ps)
/* 2xx - build dialog/send refer */
msg = ps->rpl;
+ if(parse_headers(msg, HDR_EOH_F, 0) < 0) {
+ LM_ERR("failed to parse the reply headers\n");
+ goto error;
+ }
if((msg->cseq==NULL || parse_headers(msg,HDR_CSEQ_F,0)<0)
|| msg->cseq==NULL || msg->cseq->parsed==NULL)
{