From: Daniel Lowrey Date: Mon, 9 Mar 2015 21:55:33 +0000 (-0600) Subject: Merge branch 'PHP-5.5' into PHP-5.6 X-Git-Tag: php-5.6.8RC1~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69691cc8cae4ac23aeeac7170458de63c5cf9267;p=php Merge branch 'PHP-5.5' into PHP-5.6 * PHP-5.5: Fix crypto stream timeout regressions --- 69691cc8cae4ac23aeeac7170458de63c5cf9267 diff --cc ext/openssl/xp_ssl.c index ccc5af7df7,e8bc6ae39d..19a9b17abd --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@@ -1918,14 -288,15 +1920,14 @@@ static size_t php_openssl_sockop_io(in } } else { /* Else, if we got bytes back, check for possible errors. */ - int err = SSL_get_error(sslsock->ssl_handle, nr_bytes ); + int err = SSL_get_error(sslsock->ssl_handle, nr_bytes); /* If we didn't get any error, then let's return it to PHP. */ - if (err == SSL_ERROR_NONE) { - break; - } + if (err == SSL_ERROR_NONE) + break; /* Otherwise, we need to wait again (up to time_left or we get an error) */ - if (blocked) { + if (began_blocked) { if (read) { php_pollfd_for(sslsock->s.socket, (err == SSL_ERROR_WANT_WRITE) ? (POLLOUT|POLLPRI) : (POLLIN|POLLPRI), has_timeout ? &left_time : NULL);