Module: sip-router Branch: kamailio_3.0 Commit: 78e8075eea603a854dcf0142dda0f1dae6c69857 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=78e8075e...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Sun Jan 10 12:07:34 2010 +0100
core: more verbose when error parsing hdr
- give a hint about the content parsing (max first 20 chars of attempted string)
---
parser/msg_parser.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/parser/msg_parser.c b/parser/msg_parser.c index e5cb7e6..48f666c 100644 --- a/parser/msg_parser.c +++ b/parser/msg_parser.c @@ -335,7 +335,8 @@ int parse_headers(struct sip_msg* msg, hdr_flags_t flags, int next) rest=get_hdr_field(tmp, end, hf); switch (hf->type){ case HDR_ERROR_T: - LOG(L_INFO,"ERROR: bad header field\n"); + LOG(L_INFO,"ERROR: bad header field [%.*s]\n", + (end-tmp>20)?20:(end-tmp), tmp); goto error; case HDR_EOH_T: msg->eoh=tmp; /* or rest?*/