Explorar o código

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 %!s(int64=16) %!d(string=hai) anos
pai
achega
027c5888fc
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;
 	}
 	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;
 	}