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

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

Issue 1516613002: Only try to pair protocol matching candidates for creating connections. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years 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 | webrtc/p2p/base/port_unittest.cc » ('j') | webrtc/p2p/base/port_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index da8b5f76c2f7b85d6684975f1c66881fec25e2f0..dfa8b00373738952a73b5966604111022ee62378 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -738,6 +738,9 @@ bool P2PTransportChannel::CreateConnections(const Candidate& remote_candidate,
bool P2PTransportChannel::CreateConnection(PortInterface* port,
const Candidate& remote_candidate,
PortInterface* origin_port) {
+ if (!port->ProtocolMatch(remote_candidate.protocol())) {
+ return false;
+ }
// Look for an existing connection with this remote address. If one is not
// found, then we can create a new connection for this address.
Connection* connection = port->GetConnection(remote_candidate.address());
pthatcher1 2015/12/11 02:05:36 So, if we get two TURN candidates, one for TCP and
honghaiz3 2015/12/11 18:36:31 TurnPort should only generate UDP candidate. GTurn
pthatcher1 2015/12/12 03:05:30 Oh, duh. Good point.
« no previous file with comments | « no previous file | webrtc/p2p/base/port_unittest.cc » ('j') | webrtc/p2p/base/port_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698