Fixing RTCIceCandidatePairStats.nominated for ICE controlling agent.
Was only working when the nonstandard "renomination" extension to ICE is enabled, which chromium doesn't use. BUG=chromium:734094 Review-Url: https://codereview.webrtc.org/2957303002 Cr-Commit-Position: refs/heads/master@{#18814}
This commit is contained in:
parent
c3e3e60f59
commit
86c40a14b4
@ -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())
|
||||
|
||||
@ -379,6 +379,8 @@ class RTCStatsReportVerifier {
|
||||
if (is_selected_pair) {
|
||||
verifier.TestMemberIsNonNegative<double>(
|
||||
candidate_pair.available_outgoing_bitrate);
|
||||
// A pair should be nominated in order to be selected.
|
||||
EXPECT_TRUE(*candidate_pair.nominated);
|
||||
} else {
|
||||
verifier.TestMemberIsUndefined(candidate_pair.available_outgoing_bitrate);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user