Module: kamailio
Branch: 4.4
Commit: 28e622cf15b3fb220b5d02e3ad237417bdaaa66c
URL:
https://github.com/kamailio/kamailio/commit/28e622cf15b3fb220b5d02e3ad23741…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-10-10T12:13:29+02:00
core: print sip message on error related to missing body
(cherry picked from commit 1ed9c2712fcfaf378875bc7e478b9481013841d4)
---
Modified: msg_translator.c
---
Diff:
https://github.com/kamailio/kamailio/commit/28e622cf15b3fb220b5d02e3ad23741…
Patch:
https://github.com/kamailio/kamailio/commit/28e622cf15b3fb220b5d02e3ad23741…
---
diff --git a/msg_translator.c b/msg_translator.c
index 9441717..7130efe 100644
--- a/msg_translator.c
+++ b/msg_translator.c
@@ -400,7 +400,7 @@ char* id_builder(struct sip_msg* msg, unsigned int *id_len)
-char* clen_builder( struct sip_msg* msg, int *clen_len, int diff,
+char* clen_builder( struct sip_msg* msg, int *clen_len, int diff,
int body_only)
{
char* buf;
@@ -414,7 +414,8 @@ char* clen_builder( struct sip_msg* msg, int *clen_len, int diff,
body=get_body(msg);
if (body==0){
ser_error=E_BAD_REQ;
- LM_ERR("no message body found (missing crlf?)");
+ LM_ERR("no message body found (missing crlf?) [[%.*s]]\n",
+ msg->len, msg->buf);
return 0;
}
value=msg->len-(int)(body-msg->buf)+diff;