From: Anatol Belski Date: Fri, 13 Feb 2015 12:40:37 +0000 (+0100) Subject: Merge branch 'PHP-5.6' X-Git-Tag: PRE_PHP7_EREG_MYSQL_REMOVALS~159 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c17e007a293356a5b1e511626addb9f13d4eaaee;p=php Merge branch 'PHP-5.6' * PHP-5.6: fix condition --- c17e007a293356a5b1e511626addb9f13d4eaaee diff --cc ext/openssl/xp_ssl.c index 2008c118e6,96c282c30d..2165091695 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@@ -1840,15 -1864,15 +1840,15 @@@ static size_t php_openssl_sockop_io(in if (errno == EAGAIN && err == SSL_ERROR_WANT_READ && read) { retry = 1; } - if (errno == EAGAIN && SSL_ERROR_WANT_WRITE && read == 0) { + if (errno == EAGAIN && err == SSL_ERROR_WANT_WRITE && read == 0) { retry = 1; } - + /* Also, on reads, we may get this condition on an EOF. We should check properly. */ if (read) { - stream->eof = (retry == 0 && errno != EAGAIN && !SSL_pending(sslsock->ssl_handle)); + stream->eof = (retry == 0 && errno != EAGAIN && !SSL_pending(sslsock->ssl_handle)); } - + /* Now, if we have to wait some time, and we're supposed to be blocking, wait for the socket to become * available. Now, php_pollfd_for uses select to wait up to our time_left value only... */