| 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 } else { | 412 } else { |
| 413 return (dtls_->WriteAll(data, size, NULL, NULL) == rtc::SR_SUCCESS) | 413 return (dtls_->WriteAll(data, size, NULL, NULL) == rtc::SR_SUCCESS) |
| 414 ? static_cast<int>(size) | 414 ? static_cast<int>(size) |
| 415 : -1; | 415 : -1; |
| 416 } | 416 } |
| 417 case DTLS_TRANSPORT_FAILED: | 417 case DTLS_TRANSPORT_FAILED: |
| 418 case DTLS_TRANSPORT_CLOSED: | 418 case DTLS_TRANSPORT_CLOSED: |
| 419 // Can't send anything when we're closed. | 419 // Can't send anything when we're closed. |
| 420 return -1; | 420 return -1; |
| 421 default: | 421 default: |
| 422 ASSERT(false); | 422 RTC_NOTREACHED(); |
| 423 return -1; | 423 return -1; |
| 424 } | 424 } |
| 425 } | 425 } |
| 426 | 426 |
| 427 bool DtlsTransportChannelWrapper::IsDtlsConnected() { | 427 bool DtlsTransportChannelWrapper::IsDtlsConnected() { |
| 428 return dtls_ && dtls_->IsTlsConnected(); | 428 return dtls_ && dtls_->IsTlsConnected(); |
| 429 } | 429 } |
| 430 | 430 |
| 431 // The state transition logic here is as follows: | 431 // The state transition logic here is as follows: |
| 432 // (1) If we're not doing DTLS-SRTP, then the state is just the | 432 // (1) If we're not doing DTLS-SRTP, then the state is just the |
| (...skipping 297 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 |