com php-src: Merge branch 'PHP-5.5' into PHP-5.6: ext/openssl/x p_ssl.c

From: Date: Thu, 07 Aug 2014 16:07:55 +0000
Subject: com php-src: Merge branch 'PHP-5.5' into PHP-5.6: ext/openssl/x p_ssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-79781@lists.php.net to get a copy of this message
Commit: 98e67add15a6b889efe152c23ed15a61f022a63a Author: Daniel Lowrey <rdlowrey@php.net> Thu, 7 Aug 2014 12:07:55 -0400 Parents: 2cdc1a2b7473eff27c224c66dcb85118b553a147 5ac2e5f850c483394870dadca465c1322a4a51cf Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=98e67add15a6b889efe152c23ed15a61f022a63a Log: Merge branch 'PHP-5.5' into PHP-5.6 * PHP-5.5: Bug #41631: Observe socket read timeouts in SSL streams Conflicts: ext/openssl/xp_ssl.c Bugs: https://bugs.php.net/41631 Changed paths: MM ext/openssl/xp_ssl.c Diff: diff --cc ext/openssl/xp_ssl.c index 1eed2eb,7080a1c..45b3d61 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@@ -1796,11 -203,41 +1796,42 @@@ static size_t php_openssl_sockop_write( return didwrite; } +/* }}} */ + static void php_openssl_stream_wait_for_data(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) +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) {

« previous php.cvs (#79781) next »