| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 *err_desc = desc; | 43 *err_desc = desc; |
| 44 } | 44 } |
| 45 LOG(LS_ERROR) << desc; | 45 LOG(LS_ERROR) << desc; |
| 46 return false; | 46 return false; |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool IceCredentialsChanged(const std::string& old_ufrag, | 49 bool IceCredentialsChanged(const std::string& old_ufrag, |
| 50 const std::string& old_pwd, | 50 const std::string& old_pwd, |
| 51 const std::string& new_ufrag, | 51 const std::string& new_ufrag, |
| 52 const std::string& new_pwd) { | 52 const std::string& new_pwd) { |
| 53 // TODO(jiayl): The standard (RFC 5245 Section 9.1.1.1) says that ICE should | 53 // The standard (RFC 5245 Section 9.1.1.1) says that ICE restarts MUST change |
| 54 // restart when both the ufrag and password are changed, but we do restart | 54 // both the ufrag and password. However, section 9.2.1.1 says changing the |
| 55 // when either ufrag or passwrod is changed to keep compatible with GICE. We | 55 // ufrag OR password indicates an ICE restart. So, to keep compatibility with |
| 56 // should clean this up when GICE is no longer used. | 56 // endpoints that only change one, we'll treat this as an ICE restart. |
| 57 return (old_ufrag != new_ufrag) || (old_pwd != new_pwd); | 57 return (old_ufrag != new_ufrag) || (old_pwd != new_pwd); |
| 58 } | 58 } |
| 59 | 59 |
| 60 static bool IceCredentialsChanged(const TransportDescription& old_desc, | 60 static bool IceCredentialsChanged(const TransportDescription& old_desc, |
| 61 const TransportDescription& new_desc) { | 61 const TransportDescription& new_desc) { |
| 62 return IceCredentialsChanged(old_desc.ice_ufrag, old_desc.ice_pwd, | 62 return IceCredentialsChanged(old_desc.ice_ufrag, old_desc.ice_pwd, |
| 63 new_desc.ice_ufrag, new_desc.ice_pwd); | 63 new_desc.ice_ufrag, new_desc.ice_pwd); |
| 64 } | 64 } |
| 65 | 65 |
| 66 Transport::Transport(const std::string& name, PortAllocator* allocator) | 66 Transport::Transport(const std::string& name, PortAllocator* allocator) |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 // negotiation happens. | 382 // negotiation happens. |
| 383 for (const auto& kv : channels_) { | 383 for (const auto& kv : channels_) { |
| 384 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) { | 384 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) { |
| 385 return false; | 385 return false; |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 return true; | 388 return true; |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace cricket | 391 } // namespace cricket |
| OLD | NEW |