Browse code

core: print sip message on error related to missing body

Daniel-Constantin Mierla authored on 20/09/2016 11:43:01
Showing 1 changed files
... ...
@@ -401,7 +401,7 @@ char* id_builder(struct sip_msg* msg, unsigned int *id_len)
401 401
 
402 402
 
403 403
 
404
-char* clen_builder(	struct sip_msg* msg, int *clen_len, int diff, 
404
+char* clen_builder(	struct sip_msg* msg, int *clen_len, int diff,
405 405
 					int body_only)
406 406
 {
407 407
 	char* buf;
... ...
@@ -415,7 +415,8 @@ char* clen_builder(	struct sip_msg* msg, int *clen_len, int diff,
415 415
 	body=get_body(msg);
416 416
 	if (body==0){
417 417
 		ser_error=E_BAD_REQ;
418
-		LM_ERR("no message body found (missing crlf?)");
418
+		LM_ERR("no message body found (missing crlf?) [[%.*s]]\n",
419
+				msg->len, msg->buf);
419 420
 		return 0;
420 421
 	}
421 422
 	value=msg->len-(int)(body-msg->buf)+diff;