소스 검색

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 년 전
부모
커밋
027c5888fc
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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;
 	}