]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.5' into PHP-5.6
authorDaniel Lowrey <rdlowrey@php.net>
Mon, 9 Mar 2015 21:55:33 +0000 (15:55 -0600)
committerDaniel Lowrey <rdlowrey@php.net>
Mon, 9 Mar 2015 21:55:33 +0000 (15:55 -0600)
* PHP-5.5:
  Fix crypto stream timeout regressions

1  2 
ext/openssl/xp_ssl.c

index ccc5af7df7642bce82d3b96ae60be8a654664cc5,e8bc6ae39d358e4bff41360614a46b9e09c23189..19a9b17abdae958943eb6b44d72f4e02efbdd334
@@@ -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);