| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2008 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 AsyncSocketAdapter::OnWriteEvent(this); | 397 AsyncSocketAdapter::OnWriteEvent(this); |
| 398 #endif | 398 #endif |
| 399 break; | 399 break; |
| 400 | 400 |
| 401 case SSL_ERROR_WANT_READ: | 401 case SSL_ERROR_WANT_READ: |
| 402 LOG(LS_VERBOSE) << " -- error want read"; | 402 LOG(LS_VERBOSE) << " -- error want read"; |
| 403 struct timeval timeout; | 403 struct timeval timeout; |
| 404 if (DTLSv1_get_timeout(ssl_, &timeout)) { | 404 if (DTLSv1_get_timeout(ssl_, &timeout)) { |
| 405 int delay = timeout.tv_sec * 1000 + timeout.tv_usec/1000; | 405 int delay = timeout.tv_sec * 1000 + timeout.tv_usec/1000; |
| 406 | 406 |
| 407 Thread::Current()->PostDelayed(delay, this, MSG_TIMEOUT, 0); | 407 Thread::Current()->PostDelayed(RTC_FROM_HERE, delay, this, MSG_TIMEOUT, |
| 408 0); |
| 408 } | 409 } |
| 409 break; | 410 break; |
| 410 | 411 |
| 411 case SSL_ERROR_WANT_WRITE: | 412 case SSL_ERROR_WANT_WRITE: |
| 412 break; | 413 break; |
| 413 | 414 |
| 414 case SSL_ERROR_ZERO_RETURN: | 415 case SSL_ERROR_ZERO_RETURN: |
| 415 default: | 416 default: |
| 416 LOG(LS_WARNING) << "ContinueSSL -- error " << code; | 417 LOG(LS_WARNING) << "ContinueSSL -- error " << code; |
| 417 return (code != 0) ? code : -1; | 418 return (code != 0) ? code : -1; |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 if (ssl_mode_ == SSL_MODE_DTLS) { | 959 if (ssl_mode_ == SSL_MODE_DTLS) { |
| 959 SSL_CTX_set_read_ahead(ctx, 1); | 960 SSL_CTX_set_read_ahead(ctx, 1); |
| 960 } | 961 } |
| 961 | 962 |
| 962 return ctx; | 963 return ctx; |
| 963 } | 964 } |
| 964 | 965 |
| 965 } // namespace rtc | 966 } // namespace rtc |
| 966 | 967 |
| 967 #endif // HAVE_OPENSSL_SSL_H | 968 #endif // HAVE_OPENSSL_SSL_H |
| OLD | NEW |