Index: webrtc/p2p/base/port.cc |
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc |
index 4023b322e732ef31e6827bd3fc95715351fc2f22..d5ea551e676689570299c972239421de8455f1ee 100644 |
--- a/webrtc/p2p/base/port.cc |
+++ b/webrtc/p2p/base/port.cc |
@@ -887,6 +887,7 @@ Connection::Connection(Port* port, |
connected_(true), |
pruned_(false), |
use_candidate_attr_(false), |
+ nominated_(false), |
remote_ice_mode_(ICEMODE_FULL), |
requests_(port->thread()), |
rtt_(DEFAULT_RTT), |
@@ -1057,7 +1058,7 @@ void Connection::OnReadPacket( |
const StunByteStringAttribute* use_candidate_attr = |
msg->GetByteString(STUN_ATTR_USE_CANDIDATE); |
if (use_candidate_attr) |
- SignalUseCandidate(this); |
+ set_nominated(true); |
} |
} else { |
// The packet had the right local username, but the remote username |
@@ -1473,6 +1474,13 @@ size_t Connection::sent_total_packets() { |
return sent_packets_total_; |
} |
+void Connection::set_nominated(bool nominated) { |
+ nominated_ = nominated; |
+ if (nominated_) { |
+ SignalUseCandidate(this); |
juberti1
2015/08/07 01:31:19
This seems like an unexpected side effect. I would
honghaiz3
2015/08/07 20:42:04
Done.
|
+ } |
+} |
+ |
void Connection::MaybeAddPrflxCandidate(ConnectionRequest* request, |
StunMessage* response) { |
// RFC 5245 |