]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorAnatol Belski <ab@php.net>
Fri, 13 Feb 2015 12:40:37 +0000 (13:40 +0100)
committerAnatol Belski <ab@php.net>
Fri, 13 Feb 2015 12:40:37 +0000 (13:40 +0100)
* PHP-5.6:
  fix condition

1  2 
ext/openssl/xp_ssl.c

index 2008c118e6432e40255ee5a68915db6c375d80de,96c282c30d6d24ef287b6c19cb3bcc6e137dc793..216509169509376912ad0f896ffe44eac16e4ae1
@@@ -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...
                                 */