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

Unified Diff: webrtc/p2p/base/stunport.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
Index: webrtc/p2p/base/stunport.cc
diff --git a/webrtc/p2p/base/stunport.cc b/webrtc/p2p/base/stunport.cc
index f99965bd72ee6672c46f2c37b35445dd425e1637..4c95222a92e216b30af9a610750e122559a3f716 100644
--- a/webrtc/p2p/base/stunport.cc
+++ b/webrtc/p2p/base/stunport.cc
@@ -253,9 +253,10 @@ void UDPPort::MaybePrepareStunCandidate() {
}
Connection* UDPPort::CreateConnection(const Candidate& address,
- CandidateOrigin origin) {
- if (address.protocol() != "udp")
+ CandidateOrigin origin) {
+ if (!ProtocolMatch(address.protocol())) {
return NULL;
+ }
if (!IsCompatibleAddress(address.address())) {
return NULL;

Powered by Google App Engine
This is Rietveld 408576698