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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // fingerprint. | 227 // fingerprint. |
228 if (!dtls_active_) { | 228 if (!dtls_active_) { |
229 LOG_J(LS_ERROR, this) << "Can't set DTLS remote settings in this state."; | 229 LOG_J(LS_ERROR, this) << "Can't set DTLS remote settings in this state."; |
230 return false; | 230 return false; |
231 } | 231 } |
232 | 232 |
233 // At this point we know we are doing DTLS | 233 // At this point we know we are doing DTLS |
234 remote_fingerprint_value_ = std::move(remote_fingerprint_value); | 234 remote_fingerprint_value_ = std::move(remote_fingerprint_value); |
235 remote_fingerprint_algorithm_ = digest_alg; | 235 remote_fingerprint_algorithm_ = digest_alg; |
236 | 236 |
237 bool reconnect = dtls_; | 237 bool reconnect = (dtls_ != nullptr); |
238 | 238 |
239 if (!SetupDtls()) { | 239 if (!SetupDtls()) { |
240 set_dtls_state(DTLS_TRANSPORT_FAILED); | 240 set_dtls_state(DTLS_TRANSPORT_FAILED); |
241 return false; | 241 return false; |
242 } | 242 } |
243 | 243 |
244 if (reconnect) { | 244 if (reconnect) { |
245 Reconnect(); | 245 Reconnect(); |
246 } | 246 } |
247 | 247 |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 | 642 |
643 void DtlsTransportChannelWrapper::Reconnect() { | 643 void DtlsTransportChannelWrapper::Reconnect() { |
644 set_dtls_state(DTLS_TRANSPORT_NEW); | 644 set_dtls_state(DTLS_TRANSPORT_NEW); |
645 set_writable(false); | 645 set_writable(false); |
646 if (channel_->writable()) { | 646 if (channel_->writable()) { |
647 OnWritableState(channel_); | 647 OnWritableState(channel_); |
648 } | 648 } |
649 } | 649 } |
650 | 650 |
651 } // namespace cricket | 651 } // namespace cricket |
OLD | NEW |