Browse Source

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.
Jan Janak 16 years ago
parent
commit
027c5888fc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      parser/parse_uri.c

+ 2 - 2
parser/parse_uri.c

@@ -1397,8 +1397,8 @@ int parse_sip_msg_uri(struct sip_msg* msg)
 		tmp_len=msg->first_line.u.request.uri.len;
 		tmp_len=msg->first_line.u.request.uri.len;
 	}
 	}
 	if (parse_uri(tmp, tmp_len, &msg->parsed_uri)<0){
 	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;
 		msg->parsed_uri_ok=0;
 		return -1;
 		return -1;
 	}
 	}