Module: sip-router Branch: master Commit: a111b33ae7b64dbf9486f2fc4b7f3007f4015e77 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a111b33a...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Feb 26 20:30:34 2014 +0100
parser/parse_fline: print offset in log message when failing to parse first line
---
parser/parse_fline.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/parser/parse_fline.c b/parser/parse_fline.c index b8fee65..5cc76c1 100644 --- a/parser/parse_fline.c +++ b/parser/parse_fline.c @@ -77,6 +77,7 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start * fl) */
+ offset = 0; end=buffer+len; /* see if it's a reply (status) */
@@ -239,7 +240,7 @@ error: }; error1: fl->type=SIP_INVALID; - LOG(L_ERR, "parse_first_line: bad message\n"); + LOG(L_ERR, "parse_first_line: bad message (offset: %d)\n", offset); /* skip line */ nl=eat_line(buffer,len); return nl;