Module: kamailio Branch: master Commit: 1ed9c2712fcfaf378875bc7e478b9481013841d4 URL: https://github.com/kamailio/kamailio/commit/1ed9c2712fcfaf378875bc7e478b9481...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-09-20T13:43:01+02:00
core: print sip message on error related to missing body
---
Modified: msg_translator.c
---
Diff: https://github.com/kamailio/kamailio/commit/1ed9c2712fcfaf378875bc7e478b9481... Patch: https://github.com/kamailio/kamailio/commit/1ed9c2712fcfaf378875bc7e478b9481...
---
diff --git a/msg_translator.c b/msg_translator.c index 362997b..618a6ba 100644 --- a/msg_translator.c +++ b/msg_translator.c @@ -401,7 +401,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; @@ -415,7 +415,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;