| 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( | 
|  | 397         ice_ufrag, ice_pwd, | 
|  | 398         static_cast<int>(remote_ice_parameters_.size() - 1)); | 
| 396   } | 399   } | 
|  | 400   // Updating the remote ICE candidate generation could change the sort order. | 
|  | 401   RequestSort(); | 
| 397 } | 402 } | 
| 398 | 403 | 
| 399 void P2PTransportChannel::SetRemoteIceMode(IceMode mode) { | 404 void P2PTransportChannel::SetRemoteIceMode(IceMode mode) { | 
| 400   remote_ice_mode_ = mode; | 405   remote_ice_mode_ = mode; | 
| 401 } | 406 } | 
| 402 | 407 | 
| 403 void P2PTransportChannel::SetIceConfig(const IceConfig& config) { | 408 void P2PTransportChannel::SetIceConfig(const IceConfig& config) { | 
| 404   config_.gather_continually = config.gather_continually; | 409   config_.gather_continually = config.gather_continually; | 
| 405   LOG(LS_INFO) << "Set gather_continually to " << config_.gather_continually; | 410   LOG(LS_INFO) << "Set gather_continually to " << config_.gather_continually; | 
| 406 | 411 | 
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1633 | 1638 | 
| 1634   // During the initial state when nothing has been pinged yet, return the first | 1639   // During the initial state when nothing has been pinged yet, return the first | 
| 1635   // one in the ordered |connections_|. | 1640   // one in the ordered |connections_|. | 
| 1636   return *(std::find_if(connections_.begin(), connections_.end(), | 1641   return *(std::find_if(connections_.begin(), connections_.end(), | 
| 1637                         [conn1, conn2](Connection* conn) { | 1642                         [conn1, conn2](Connection* conn) { | 
| 1638                           return conn == conn1 || conn == conn2; | 1643                           return conn == conn1 || conn == conn2; | 
| 1639                         })); | 1644                         })); | 
| 1640 } | 1645 } | 
| 1641 | 1646 | 
| 1642 }  // namespace cricket | 1647 }  // namespace cricket | 
| OLD | NEW | 
|---|