Browse Source

core: print sip message on error related to missing body

Daniel-Constantin Mierla 9 years ago
parent
commit
1ed9c2712f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      msg_translator.c

+ 3 - 2
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;