Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: webrtc/p2p/base/tcpport.cc

Issue 1360203003: Address the comment from 1367553002 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/tcpport.cc
diff --git a/webrtc/p2p/base/tcpport.cc b/webrtc/p2p/base/tcpport.cc
index acaa6404cbec08eaaabeb2d279eb60673a0bfd6a..86982b01c673d191fdb61489cdeaeacef4719546 100644
--- a/webrtc/p2p/base/tcpport.cc
+++ b/webrtc/p2p/base/tcpport.cc
@@ -374,18 +374,18 @@ void TCPConnection::OnConnect(rtc::AsyncPacketSocket* socket) {
// given a binding address, and the platform is expected to pick the
// correct local address.
const rtc::IPAddress& socket_ip = socket->GetLocalAddress().ipaddr();
- if (socket_ip == port()->ip()) {
- LOG_J(LS_VERBOSE, this) << "Connection established to "
- << socket->GetRemoteAddress().ToSensitiveString();
- set_connected(true);
- connection_pending_ = false;
- } else if (IPIsAny(port()->ip())) {
- LOG(LS_WARNING) << "Socket is bound to a different address:"
- << socket->GetLocalAddress().ipaddr().ToString()
- << ", rather then the local port:"
- << port()->ip().ToString()
- << ". Still allowing it since it's any address"
- << ", possibly caused by multi-routes being disabled.";
+ if (socket_ip == port()->ip() || IPIsAny(port()->ip())) {
+ if (socket_ip == port()->ip()) {
+ LOG_J(LS_VERBOSE, this) << "Connection established to "
+ << socket->GetRemoteAddress().ToSensitiveString();
+ } else {
+ LOG(LS_WARNING) << "Socket is bound to a different address:"
+ << socket->GetLocalAddress().ipaddr().ToString()
+ << ", rather then the local port:"
+ << port()->ip().ToString()
+ << ". Still allowing it since it's any address"
+ << ", possibly caused by multi-routes being disabled.";
+ }
set_connected(true);
connection_pending_ = false;
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698