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

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

Issue 2087713002: When a remote candidate is added, update all prflx candidates. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index 332d951a185a99da145c0ec15fc86f3afea3ce7c..94530506c157d6e10da76d36c4243bdf4f743a84 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -785,6 +785,12 @@ void P2PTransportChannel::AddRemoteCandidate(const Candidate& candidate) {
}
}
+ // If this candidate matches what was thought to be a peer reflexive
+ // candidate, we need to update the candidate priority/etc.
+ for (Connection* conn : connections_) {
+ conn->MaybeUpdatePeerReflexiveCandidate(new_remote_candidate);
+ }
+
// Create connections to this remote candidate.
CreateConnections(new_remote_candidate, NULL);
@@ -883,9 +889,6 @@ bool P2PTransportChannel::CreateConnection(PortInterface* port,
}
// No new connection was created.
- // Check if this is a peer reflexive candidate.
- connection->MaybeUpdatePeerReflexiveCandidate(remote_candidate);
-
// It is not legal to try to change any of the parameters of an existing
// connection; however, the other side can send a duplicate candidate.
if (!remote_candidate.IsEquivalent(connection->remote_candidate())) {
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698