[sr-dev] git:master:4161fdd7: modules/ims_dialog: extra error condition logging

jaybeepee jason.penton at gmail.com
Tue Mar 29 15:54:28 CEST 2016


Module: kamailio
Branch: master
Commit: 4161fdd7ad1f4273f9e02eb0093dde502f248157
URL: https://github.com/kamailio/kamailio/commit/4161fdd7ad1f4273f9e02eb0093dde502f248157

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2016-03-29T15:52:34+02:00

modules/ims_dialog: extra error condition logging

---

Modified: modules/ims_dialog/dlg_handlers.c

---

Diff:  https://github.com/kamailio/kamailio/commit/4161fdd7ad1f4273f9e02eb0093dde502f248157.diff
Patch: https://github.com/kamailio/kamailio/commit/4161fdd7ad1f4273f9e02eb0093dde502f248157.patch

---

diff --git a/modules/ims_dialog/dlg_handlers.c b/modules/ims_dialog/dlg_handlers.c
index e8b2c04..b4b5592 100644
--- a/modules/ims_dialog/dlg_handlers.c
+++ b/modules/ims_dialog/dlg_handlers.c
@@ -187,7 +187,10 @@ int populate_leg_info(struct dlg_cell *dlg, struct sip_msg *msg,
 
     /* extract the contact address */
     if (!msg->contact && (parse_headers(msg, HDR_CONTACT_F, 0) < 0 || !msg->contact)) {
-        LM_ERR("bad sip message or missing Contact hdr\n");
+        if (msg->first_line.type == SIP_REQUEST)
+            LM_ERR("bad sip message or missing Contact hdr for message [%.*s]\n", msg->first_line.u.request.method.len, msg->first_line.u.request.method.s);
+        else
+            LM_ERR("bad sip message or missing Contact hdr for message [%.*s]\n", msg->first_line.u.reply.status.len, msg->first_line.u.reply.status.s);
         goto error0;
     }
     if (parse_contact(msg->contact) < 0 ||




More information about the sr-dev mailing list