OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 this, &DtlsTransportChannelWrapper::OnSelectedCandidatePairChanged); | 131 this, &DtlsTransportChannelWrapper::OnSelectedCandidatePairChanged); |
132 channel_->SignalStateChanged.connect( | 132 channel_->SignalStateChanged.connect( |
133 this, &DtlsTransportChannelWrapper::OnChannelStateChanged); | 133 this, &DtlsTransportChannelWrapper::OnChannelStateChanged); |
134 channel_->SignalReceivingState.connect(this, | 134 channel_->SignalReceivingState.connect(this, |
135 &DtlsTransportChannelWrapper::OnReceivingState); | 135 &DtlsTransportChannelWrapper::OnReceivingState); |
136 } | 136 } |
137 | 137 |
138 DtlsTransportChannelWrapper::~DtlsTransportChannelWrapper() { | 138 DtlsTransportChannelWrapper::~DtlsTransportChannelWrapper() { |
139 } | 139 } |
140 | 140 |
141 void DtlsTransportChannelWrapper::Connect() { | |
142 // We should only get a single call to Connect. | |
143 ASSERT(dtls_state() == DTLS_TRANSPORT_NEW); | |
144 channel_->Connect(); | |
145 } | |
146 | |
147 bool DtlsTransportChannelWrapper::SetLocalCertificate( | 141 bool DtlsTransportChannelWrapper::SetLocalCertificate( |
148 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) { | 142 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) { |
149 if (dtls_active_) { | 143 if (dtls_active_) { |
150 if (certificate == local_certificate_) { | 144 if (certificate == local_certificate_) { |
151 // This may happen during renegotiation. | 145 // This may happen during renegotiation. |
152 LOG_J(LS_INFO, this) << "Ignoring identical DTLS identity"; | 146 LOG_J(LS_INFO, this) << "Ignoring identical DTLS identity"; |
153 return true; | 147 return true; |
154 } else { | 148 } else { |
155 LOG_J(LS_ERROR, this) << "Can't change DTLS local identity in this state"; | 149 LOG_J(LS_ERROR, this) << "Can't change DTLS local identity in this state"; |
156 return false; | 150 return false; |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 | 674 |
681 void DtlsTransportChannelWrapper::Reconnect() { | 675 void DtlsTransportChannelWrapper::Reconnect() { |
682 set_dtls_state(DTLS_TRANSPORT_NEW); | 676 set_dtls_state(DTLS_TRANSPORT_NEW); |
683 set_writable(false); | 677 set_writable(false); |
684 if (channel_->writable()) { | 678 if (channel_->writable()) { |
685 OnWritableState(channel_); | 679 OnWritableState(channel_); |
686 } | 680 } |
687 } | 681 } |
688 | 682 |
689 } // namespace cricket | 683 } // namespace cricket |
OLD | NEW |