| Index: webrtc/p2p/base/port.cc
|
| diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
|
| index d26a9302a8af7ba55bc98b3a979a331a6337ec71..c66c02b966fa2f006abf8b9a61aa315f495bd72a 100644
|
| --- a/webrtc/p2p/base/port.cc
|
| +++ b/webrtc/p2p/base/port.cc
|
| @@ -1298,11 +1298,19 @@ void Connection::HandleRoleConflictFromPeer() {
|
| port_->SignalRoleConflict(port_);
|
| }
|
|
|
| -void Connection::MaybeSetRemoteIceCredentials(const std::string& ice_ufrag,
|
| - const std::string& ice_pwd) {
|
| - if (remote_candidate_.username() == ice_ufrag &&
|
| - remote_candidate_.password().empty()) {
|
| - remote_candidate_.set_password(ice_pwd);
|
| +void Connection::MaybeSetRemoteIceCredentialsAndGeneration(
|
| + const std::vector<IceParameters>& remote_ice_parameters) {
|
| + int generation = 0;
|
| + for (const IceParameters& params : remote_ice_parameters) {
|
| + if (remote_candidate_.username() == params.ufrag &&
|
| + remote_candidate_.password().empty()) {
|
| + remote_candidate_.set_password(params.pwd);
|
| + }
|
| + if (remote_candidate_.username() == params.ufrag &&
|
| + remote_candidate_.password() == params.pwd) {
|
| + remote_candidate_.set_generation(generation);
|
| + }
|
| + ++generation;
|
| }
|
| }
|
|
|
|
|