OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
595 // Older versions of Chrome expect the ICE role to be re-determined when an | 595 // Older versions of Chrome expect the ICE role to be re-determined when an |
596 // ICE restart occurs, and also don't perform conflict resolution correctly, | 596 // ICE restart occurs, and also don't perform conflict resolution correctly, |
597 // so for now we can't safely stop doing this, unless the application opts in | 597 // so for now we can't safely stop doing this, unless the application opts in |
598 // by setting |redetermine_role_on_ice_restart_| to false. | 598 // by setting |redetermine_role_on_ice_restart_| to false. |
599 // See: https://bugs.chromium.org/p/chromium/issues/detail?id=628676 | 599 // See: https://bugs.chromium.org/p/chromium/issues/detail?id=628676 |
600 // TODO(deadbeef): Remove this when these old versions of Chrome reach a low | 600 // TODO(deadbeef): Remove this when these old versions of Chrome reach a low |
601 // enough population. | 601 // enough population. |
602 if (redetermine_role_on_ice_restart_ && transport->local_description() && | 602 if (redetermine_role_on_ice_restart_ && transport->local_description() && |
603 IceCredentialsChanged(transport->local_description()->ice_ufrag, | 603 IceCredentialsChanged(transport->local_description()->ice_ufrag, |
604 transport->local_description()->ice_pwd, | 604 transport->local_description()->ice_pwd, |
605 tdesc.ice_ufrag, tdesc.ice_pwd)) { | 605 tdesc.ice_ufrag, tdesc.ice_pwd) && |
606 // Don't change the ICE role if the remote endpoint is ICE lite; we | |
607 // should always be controlling in that case. | |
Zhi Huang
2017/04/12 21:32:59
Extreme minor thing. Since we are changing the ice
Taylor Brandstetter
2017/04/20 07:23:53
Done.
| |
608 (!transport->remote_description() || | |
609 transport->remote_description()->ice_mode == ICEMODE_FULL)) { | |
606 IceRole new_ice_role = | 610 IceRole new_ice_role = |
607 (action == CA_OFFER) ? ICEROLE_CONTROLLING : ICEROLE_CONTROLLED; | 611 (action == CA_OFFER) ? ICEROLE_CONTROLLING : ICEROLE_CONTROLLED; |
608 SetIceRole(new_ice_role); | 612 SetIceRole(new_ice_role); |
609 } | 613 } |
610 | 614 |
611 LOG(LS_INFO) << "Set local transport description on " << transport_name; | 615 LOG(LS_INFO) << "Set local transport description on " << transport_name; |
612 return transport->SetLocalTransportDescription(tdesc, action, err); | 616 return transport->SetLocalTransportDescription(tdesc, action, err); |
613 } | 617 } |
614 | 618 |
615 bool TransportController::SetRemoteTransportDescription_n( | 619 bool TransportController::SetRemoteTransportDescription_n( |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
883 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, | 887 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, |
884 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); | 888 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); |
885 } | 889 } |
886 } | 890 } |
887 | 891 |
888 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) { | 892 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) { |
889 SignalDtlsHandshakeError(error); | 893 SignalDtlsHandshakeError(error); |
890 } | 894 } |
891 | 895 |
892 } // namespace cricket | 896 } // namespace cricket |
OLD | NEW |