Don't log PW mismatch messages in production

The STUN message about mismatched passwords is not interesting.
Only emit it in VERBOSE mode when DCHECK is on.

Bug: webrtc:14578
Change-Id: Ie83080d88be6da24e7f2f79d7eb279087f84c2a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288740
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38938}
This commit is contained in:
Harald Alvestrand 2022-12-21 10:51:54 +00:00 committed by WebRTC LUCI CQ
parent 315b95ca11
commit 70d9e4e02b

View File

@ -483,9 +483,10 @@ void Connection::OnReadPacket(const char* data,
case StunMessage::IntegrityStatus::kIntegrityOk:
if (remote_candidate().password() != msg->password()) {
// TODO(bugs.webrtc.org/14578): Do a better thing
RTC_LOG(LS_INFO) << "STUN code error - Different passwords, old = "
<< absl::CHexEscape(msg->password()) << ", new "
<< absl::CHexEscape(remote_candidate().password());
RTC_DLOG(LS_VERBOSE)
<< "STUN code error - Different passwords, old = "
<< absl::CHexEscape(msg->password()) << ", new "
<< absl::CHexEscape(remote_candidate().password());
}
break;
default: