]> granicus.if.org Git - php/commitdiff
Don't forget these EOF flags either...
authorWez Furlong <wez@php.net>
Wed, 8 Oct 2003 11:22:47 +0000 (11:22 +0000)
committerWez Furlong <wez@php.net>
Wed, 8 Oct 2003 11:22:47 +0000 (11:22 +0000)
main/network.c

index 243851171f6c17725b81e49d38a6cfc8a859ac42..59217e7302d32c485385e602ebe59e05a863af24 100644 (file)
@@ -1013,9 +1013,7 @@ static size_t php_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS
 
                        if (nr_bytes <= 0) {
                                retry = handle_ssl_error(stream, nr_bytes TSRMLS_CC);
-                               if (retry == 0 && !SSL_pending(sock->ssl_handle)) {
-                                       stream->eof = 1;
-                               }
+                               stream->eof = (retry == 0 && !SSL_pending(sock->ssl_handle));
                        } else {
                                /* we got the data */
                                break;
@@ -1034,9 +1032,7 @@ static size_t php_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS
 
                nr_bytes = recv(sock->socket, buf, count, 0);
 
-               if (nr_bytes == 0 || (nr_bytes == -1 && php_socket_errno() != EWOULDBLOCK)) {
-                       stream->eof = 1;
-               }
+               stream->eof = (nr_bytes == 0 || (nr_bytes == -1 && php_socket_errno() != EWOULDBLOCK));
        }
 
        if (nr_bytes > 0) {