First step of passive aggressive nomination.
On the controlled side, a stun request without use-candidate attribute will
be used for sending media.
BUG=4900
Review URL: https://codereview.webrtc.org/1270613006
Cr-Commit-Position: refs/heads/master@{#9747}
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index 89eed8b..8048201 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -787,6 +787,7 @@
connected_(true),
pruned_(false),
use_candidate_attr_(false),
+ nominated_(false),
remote_ice_mode_(ICEMODE_FULL),
requests_(port->thread()),
rtt_(DEFAULT_RTT),
@@ -954,8 +955,10 @@
if (port_->GetIceRole() == ICEROLE_CONTROLLED) {
const StunByteStringAttribute* use_candidate_attr =
msg->GetByteString(STUN_ATTR_USE_CANDIDATE);
- if (use_candidate_attr)
- SignalUseCandidate(this);
+ if (use_candidate_attr) {
+ set_nominated(true);
+ SignalNominated(this);
+ }
}
} else {
// The packet had the right local username, but the remote username