From 5c33488eafb951a3be3f99519e926d422609018c Mon Sep 17 00:00:00 2001 From: Mke Brady Date: Mon, 15 Jun 2015 21:33:35 +0100 Subject: [PATCH] Print our whole meessage content on error --- rtsp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rtsp.c b/rtsp.c index 3144eeec..20c378a5 100644 --- a/rtsp.c +++ b/rtsp.c @@ -1148,7 +1148,19 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag } if (!paesiv || !prsaaeskey || !pfmtp) { - warn("required params missing from announce"); + warn("required params missing from the following ANNOUNCE message:"); + // print each line of the request content + // the problem is that nextline has replace all returns, newlines, etc. by NULLs + char *cp = req->content; + int cp_left = req->contentlength; + while (cp_left>1) { + if (strlen(cp)!=0) + warn(" %s",cp); + cp+=strlen(cp)+1; + cp_left-=strlen(cp)+1; + } + char *next; + goto out; }