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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 | 626 |
627 void DtlsTransportChannelWrapper::MaybeStartDtls() { | 627 void DtlsTransportChannelWrapper::MaybeStartDtls() { |
628 if (dtls_ && channel_->writable()) { | 628 if (dtls_ && channel_->writable()) { |
629 if (dtls_->StartSSL()) { | 629 if (dtls_->StartSSL()) { |
630 // This should never fail: | 630 // This should never fail: |
631 // Because we are operating in a nonblocking mode and all | 631 // Because we are operating in a nonblocking mode and all |
632 // incoming packets come in via OnReadPacket(), which rejects | 632 // incoming packets come in via OnReadPacket(), which rejects |
633 // packets in this state, the incoming queue must be empty. We | 633 // packets in this state, the incoming queue must be empty. We |
634 // ignore write errors, thus any errors must be because of | 634 // ignore write errors, thus any errors must be because of |
635 // configuration and therefore are our fault. | 635 // configuration and therefore are our fault. |
636 RTC_DCHECK(false) << "StartSSL failed."; | 636 RTC_NOTREACHED() << "StartSSL failed."; |
637 LOG_J(LS_ERROR, this) << "Couldn't start DTLS handshake"; | 637 LOG_J(LS_ERROR, this) << "Couldn't start DTLS handshake"; |
638 set_dtls_state(DTLS_TRANSPORT_FAILED); | 638 set_dtls_state(DTLS_TRANSPORT_FAILED); |
639 return; | 639 return; |
640 } | 640 } |
641 LOG_J(LS_INFO, this) | 641 LOG_J(LS_INFO, this) |
642 << "DtlsTransportChannelWrapper: Started DTLS handshake"; | 642 << "DtlsTransportChannelWrapper: Started DTLS handshake"; |
643 set_dtls_state(DTLS_TRANSPORT_CONNECTING); | 643 set_dtls_state(DTLS_TRANSPORT_CONNECTING); |
644 // Now that the handshake has started, we can process a cached ClientHello | 644 // Now that the handshake has started, we can process a cached ClientHello |
645 // (if one exists). | 645 // (if one exists). |
646 if (cached_client_hello_.size()) { | 646 if (cached_client_hello_.size()) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 ASSERT(channel == channel_); | 730 ASSERT(channel == channel_); |
731 SignalStateChanged(this); | 731 SignalStateChanged(this); |
732 } | 732 } |
733 | 733 |
734 void DtlsTransportChannelWrapper::OnDtlsHandshakeError( | 734 void DtlsTransportChannelWrapper::OnDtlsHandshakeError( |
735 rtc::SSLHandshakeError error) { | 735 rtc::SSLHandshakeError error) { |
736 SignalDtlsHandshakeError(error); | 736 SignalDtlsHandshakeError(error); |
737 } | 737 } |
738 | 738 |
739 } // namespace cricket | 739 } // namespace cricket |
OLD | NEW |