diff options
author | Johannes Schlüter <johannes@php.net> | 2011-08-23 08:12:58 +0000 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2011-08-23 08:12:58 +0000 |
commit | eb303f7a5930ffb5906489ec3b0c09fd2f420886 (patch) | |
tree | 0a014ff530d5275c58d04f192e978ebe400c9521 | |
parent | 6b3394140072f6b86bdd540d2e2197b990d8c414 (diff) | |
download | php-git-eb303f7a5930ffb5906489ec3b0c09fd2f420886.tar.gz |
Mere r315310 (Revert r313515)
-rw-r--r-- | ext/openssl/xp_ssl.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index e0f06a76dc..4b4a144691 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -204,36 +204,6 @@ static size_t php_openssl_sockop_write(php_stream *stream, const char *buf, size return didwrite; } -static void php_openssl_stream_wait_for_data(php_stream *stream, php_netstream_data_t *sock TSRMLS_DC) -{ - int retval; - struct timeval *ptimeout; - - if (sock->socket == -1) { - return; - } - - sock->timeout_event = 0; - - if (sock->timeout.tv_sec == -1) - ptimeout = NULL; - else - ptimeout = &sock->timeout; - - while(1) { - retval = php_pollfd_for(sock->socket, PHP_POLLREADABLE, ptimeout); - - if (retval == 0) - sock->timeout_event = 1; - - if (retval >= 0) - break; - - if (php_socket_errno() != EINTR) - break; - } -} - static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) { php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; @@ -243,13 +213,6 @@ static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t coun int retry = 1; do { - if (sslsock->s.is_blocked) { - php_openssl_stream_wait_for_data(stream, &(sslsock->s) TSRMLS_CC); - if (sslsock->s.timeout_event) { - break; - } - /* there is no guarantee that there is application data available but something is there */ - } nr_bytes = SSL_read(sslsock->ssl_handle, buf, count); if (nr_bytes <= 0) { |