浏览代码

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 年之前
父节点
当前提交
47e9d6d836
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      parser/parse_uri.c

+ 2 - 2
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;
 	}