com php-src: Revert "Merge branch 'PHP-5.5' into PHP-5.6": ext/openssl/xp_ssl.c

From: Date: Wed, 01 Oct 2014 14:09:27 +0000
Subject: com php-src: Revert "Merge branch 'PHP-5.5' into PHP-5.6": ext/openssl/xp_ssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82038@lists.php.net to get a copy of this message
Commit: 25a18c5d7326a99ddb2714c5fdbced8ad09bb7e8 Author: Julien Pauli <jpauli@php.net> Wed, 1 Oct 2014 16:09:27 +0200 Parents: 4cbc55adb1bf348d8037e5c9453039826bf09897 Branches: PHP-5.5.18 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=25a18c5d7326a99ddb2714c5fdbced8ad09bb7e8 Log: Revert "Merge branch 'PHP-5.5' into PHP-5.6" This reverts commit 98e67add15a6b889efe152c23ed15a61f022a63a, reversing changes made to 2cdc1a2b7473eff27c224c66dcb85118b553a147. Conflicts: ext/openssl/xp_ssl.c Changed paths: M ext/openssl/xp_ssl.c Diff: diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index b8d1d5b..6c92296 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -171,7 +171,6 @@ static int handle_ssl_error(php_stream *stream, int nr_bytes, zend_bool is_init return retry; } - static size_t php_openssl_sockop_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) { php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract; @@ -234,29 +233,13 @@ static void php_openssl_stream_wait_for_data(php_netstream_data_t *sock TSRMLS_D } } -static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) +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; - php_netstream_data_t *sock; int nr_bytes = 0; if (sslsock->ssl_active) { int retry = 1; - sock = (php_netstream_data_t*)stream->abstract; - - /* The SSL_read() function will block indefinitely waiting for data on a blocking - socket. If we don't poll for readability first this operation has the potential - to hang forever. To avoid this scenario we poll with a timeout before performing - the actual read. If it times out we're finished. - */ - if (sock->is_blocked) { - php_openssl_stream_wait_for_data(sock); - if (sock->timeout_event) { - stream->eof = 1; - php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL read operation timed out"); - return nr_bytes; - } - } do { nr_bytes = SSL_read(sslsock->ssl_handle, buf, count);

« previous php.cvs (#82038) next »