Browse code

core: print sip message on error related to missing body

(cherry picked from commit 1ed9c2712fcfaf378875bc7e478b9481013841d4)

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