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

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

Issue 2957303002: Fixing RTCIceCandidatePairStats.nominated for ICE controlling agent. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | webrtc/pc/rtcstats_integrationtest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/port.cc
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index e657125869c74812f1a4c52c05a785b8af31f958..3a3d9ead8bab9330d8c7206f168b538d809dedca 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -1251,7 +1251,14 @@ void Connection::UpdateState(int64_t now) {
void Connection::Ping(int64_t now) {
last_ping_sent_ = now;
ConnectionRequest *req = new ConnectionRequest(this);
- pings_since_last_response_.push_back(SentPing(req->id(), now, nomination_));
+ // If not using renomination, we use "1" to mean "nominated" and "0" to mean
+ // "not nominated". If using renomination, values greater than 1 are used for
+ // re-nominated pairs.
+ int nomination = use_candidate_attr_ ? 1 : 0;
+ if (nomination_ > 0) {
+ nomination = nomination_;
+ }
+ pings_since_last_response_.push_back(SentPing(req->id(), now, nomination));
packet_loss_estimator_.ExpectResponse(req->id(), now);
LOG_J(LS_VERBOSE, this) << "Sending STUN ping "
<< ", id=" << rtc::hex_encode(req->id())
« no previous file with comments | « no previous file | webrtc/pc/rtcstats_integrationtest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698