| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 stats_.sent_ping_requests_total++; | 1412 stats_.sent_ping_requests_total++; |
| 1413 if (stats_.recv_ping_responses == 0) { | 1413 if (stats_.recv_ping_responses == 0) { |
| 1414 stats_.sent_ping_requests_before_first_response++; | 1414 stats_.sent_ping_requests_before_first_response++; |
| 1415 } | 1415 } |
| 1416 } | 1416 } |
| 1417 | 1417 |
| 1418 void Connection::HandleRoleConflictFromPeer() { | 1418 void Connection::HandleRoleConflictFromPeer() { |
| 1419 port_->SignalRoleConflict(port_); | 1419 port_->SignalRoleConflict(port_); |
| 1420 } | 1420 } |
| 1421 | 1421 |
| 1422 void Connection::MaybeSetRemoteIceCredentialsAndGeneration( | 1422 void Connection::MaybeSetRemoteIceParametersAndGeneration( |
| 1423 const std::string& ice_ufrag, | 1423 const IceParameters& ice_params, |
| 1424 const std::string& ice_pwd, | |
| 1425 int generation) { | 1424 int generation) { |
| 1426 if (remote_candidate_.username() == ice_ufrag && | 1425 if (remote_candidate_.username() == ice_params.ufrag && |
| 1427 remote_candidate_.password().empty()) { | 1426 remote_candidate_.password().empty()) { |
| 1428 remote_candidate_.set_password(ice_pwd); | 1427 remote_candidate_.set_password(ice_params.pwd); |
| 1429 } | 1428 } |
| 1430 // TODO(deadbeef): A value of '0' for the generation is used for both | 1429 // TODO(deadbeef): A value of '0' for the generation is used for both |
| 1431 // generation 0 and "generation unknown". It should be changed to an | 1430 // generation 0 and "generation unknown". It should be changed to an |
| 1432 // rtc::Optional to fix this. | 1431 // rtc::Optional to fix this. |
| 1433 if (remote_candidate_.username() == ice_ufrag && | 1432 if (remote_candidate_.username() == ice_params.ufrag && |
| 1434 remote_candidate_.password() == ice_pwd && | 1433 remote_candidate_.password() == ice_params.pwd && |
| 1435 remote_candidate_.generation() == 0) { | 1434 remote_candidate_.generation() == 0) { |
| 1436 remote_candidate_.set_generation(generation); | 1435 remote_candidate_.set_generation(generation); |
| 1437 } | 1436 } |
| 1438 } | 1437 } |
| 1439 | 1438 |
| 1440 void Connection::MaybeUpdatePeerReflexiveCandidate( | 1439 void Connection::MaybeUpdatePeerReflexiveCandidate( |
| 1441 const Candidate& new_candidate) { | 1440 const Candidate& new_candidate) { |
| 1442 if (remote_candidate_.type() == PRFLX_PORT_TYPE && | 1441 if (remote_candidate_.type() == PRFLX_PORT_TYPE && |
| 1443 new_candidate.type() != PRFLX_PORT_TYPE && | 1442 new_candidate.type() != PRFLX_PORT_TYPE && |
| 1444 remote_candidate_.protocol() == new_candidate.protocol() && | 1443 remote_candidate_.protocol() == new_candidate.protocol() && |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 ASSERT(sent < 0); | 1565 ASSERT(sent < 0); |
| 1567 error_ = port_->GetError(); | 1566 error_ = port_->GetError(); |
| 1568 stats_.sent_discarded_packets++; | 1567 stats_.sent_discarded_packets++; |
| 1569 } else { | 1568 } else { |
| 1570 send_rate_tracker_.AddSamples(sent); | 1569 send_rate_tracker_.AddSamples(sent); |
| 1571 } | 1570 } |
| 1572 return sent; | 1571 return sent; |
| 1573 } | 1572 } |
| 1574 | 1573 |
| 1575 } // namespace cricket | 1574 } // namespace cricket |
| OLD | NEW |