Module: kamailio
Branch: master
Commit: 69a89021f95b19c803cff3919bf38be2cb1dbbd2
URL:
https://github.com/kamailio/kamailio/commit/69a89021f95b19c803cff3919bf38be…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-10-14T15:20:53+02:00
core: msg parser - more log message for get body function
---
Modified: parser/msg_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/69a89021f95b19c803cff3919bf38be…
Patch:
https://github.com/kamailio/kamailio/commit/69a89021f95b19c803cff3919bf38be…
---
diff --git a/parser/msg_parser.c b/parser/msg_parser.c
index 74866a2..54b2f12 100644
--- a/parser/msg_parser.c
+++ b/parser/msg_parser.c
@@ -1107,12 +1107,15 @@ char* get_body(sip_msg_t* const msg)
int offset;
unsigned int len;
- if ( parse_headers(msg, HDR_EOH_F, 0)==-1 )
+ if ( parse_headers(msg, HDR_EOH_F, 0)==-1 ) {
+ LM_ERR("failed to parse to end of headers\n");
return 0;
+ }
if (msg->unparsed) {
len=(unsigned int)(msg->unparsed-msg->buf);
} else {
+ LM_ERR("unparsed hook for end of headers is not set\n");
return 0;
}
@@ -1122,6 +1125,8 @@ char* get_body(sip_msg_t* const msg)
(*(msg->unparsed)=='\n' || *(msg->unparsed)=='\r' ) ) {
offset = 1;
} else {
+ LM_ERR("failed to locate end of headers (%p %p - %d %d [%s])\n",
+ msg->buf, msg->unparsed, msg->len, len, msg->unparsed);
return 0;
}
@@ -1129,7 +1134,7 @@ char* get_body(sip_msg_t* const msg)
}
/*! \brief make sure all HFs needed for transaction identification have been
- parsed; return 0 if those HFs can't be found
+ * parsed; return 0 if those HFs can't be found
*/
int check_transaction_quadruple(sip_msg_t* const msg)
{