Module: sip-router Branch: master Commit: 47e9d6d83617e79c774c8815ec88610dc24e3dc4 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=47e9d6d8...
Author: Jan Janak jan@ryngle.com Committer: Jan Janak jan@ryngle.com Date: Mon Oct 26 14:15:53 2009 +0100
parse_sip_msg_uri: Log broken URIs only when debugging is enabled.
Logging broken Request-URIs with LOG(L_ERR) generates too much traffic in syslog by default. Broken Request-URIs are beyond our control and we should not generate an error message each time we receive and parse one. We log them only when debugging is enabled.
---
parser/parse_uri.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/parser/parse_uri.c b/parser/parse_uri.c index 60f28c5..b9d487e 100644 --- a/parser/parse_uri.c +++ b/parser/parse_uri.c @@ -1403,8 +1403,8 @@ int parse_sip_msg_uri(struct sip_msg* msg) tmp_len=msg->first_line.u.request.uri.len; } if (parse_uri(tmp, tmp_len, &msg->parsed_uri)<0){ - LOG(L_ERR, "ERROR: parse_sip_msg_uri: bad uri <%.*s>\n", - tmp_len, tmp); + DBG("ERROR: parse_sip_msg_uri: bad uri <%.*s>\n", + tmp_len, tmp); msg->parsed_uri_ok=0; return -1; }