Chromium Code Reviews| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 383 // are prioritized over the older ones. | 383 // are prioritized over the older ones. |
| 384 remote_ice_parameters_.push_back(new_ice); | 384 remote_ice_parameters_.push_back(new_ice); |
| 385 } | 385 } |
| 386 | 386 |
| 387 // Update the pwd of remote candidate if needed. | 387 // Update the pwd of remote candidate if needed. |
| 388 for (RemoteCandidate& candidate : remote_candidates_) { | 388 for (RemoteCandidate& candidate : remote_candidates_) { |
| 389 if (candidate.username() == ice_ufrag && candidate.password().empty()) { | 389 if (candidate.username() == ice_ufrag && candidate.password().empty()) { |
| 390 candidate.set_password(ice_pwd); | 390 candidate.set_password(ice_pwd); |
| 391 } | 391 } |
| 392 } | 392 } |
| 393 // We need to update the credentials for any peer reflexive candidates. | 393 // We need to update the credentials and generation for any peer reflexive |
| 394 // candidates. | |
| 394 for (Connection* conn : connections_) { | 395 for (Connection* conn : connections_) { |
| 395 conn->MaybeSetRemoteIceCredentials(ice_ufrag, ice_pwd); | 396 conn->MaybeSetRemoteIceCredentialsAndGeneration(remote_ice_parameters_); |
|
honghaiz3
2016/04/18 16:12:37
Why does this need to pass all ice parameters and
Taylor Brandstetter
2016/04/18 23:30:01
You're right. I don't remember what I was thinking
| |
| 396 } | 397 } |
| 398 // Updating the remote ICE candidate generation could change the sort order. | |
| 399 RequestSort(); | |
| 397 } | 400 } |
| 398 | 401 |
| 399 void P2PTransportChannel::SetRemoteIceMode(IceMode mode) { | 402 void P2PTransportChannel::SetRemoteIceMode(IceMode mode) { |
| 400 remote_ice_mode_ = mode; | 403 remote_ice_mode_ = mode; |
| 401 } | 404 } |
| 402 | 405 |
| 403 void P2PTransportChannel::SetIceConfig(const IceConfig& config) { | 406 void P2PTransportChannel::SetIceConfig(const IceConfig& config) { |
| 404 config_.gather_continually = config.gather_continually; | 407 config_.gather_continually = config.gather_continually; |
| 405 LOG(LS_INFO) << "Set gather_continually to " << config_.gather_continually; | 408 LOG(LS_INFO) << "Set gather_continually to " << config_.gather_continually; |
| 406 | 409 |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1633 | 1636 |
| 1634 // During the initial state when nothing has been pinged yet, return the first | 1637 // During the initial state when nothing has been pinged yet, return the first |
| 1635 // one in the ordered |connections_|. | 1638 // one in the ordered |connections_|. |
| 1636 return *(std::find_if(connections_.begin(), connections_.end(), | 1639 return *(std::find_if(connections_.begin(), connections_.end(), |
| 1637 [conn1, conn2](Connection* conn) { | 1640 [conn1, conn2](Connection* conn) { |
| 1638 return conn == conn1 || conn == conn2; | 1641 return conn == conn1 || conn == conn2; |
| 1639 })); | 1642 })); |
| 1640 } | 1643 } |
| 1641 | 1644 |
| 1642 } // namespace cricket | 1645 } // namespace cricket |
| OLD | NEW |