From: Wez Furlong Date: Wed, 8 Oct 2003 11:22:47 +0000 (+0000) Subject: Don't forget these EOF flags either... X-Git-Tag: php-4.3.4RC2~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2aeb246874951ec6bf1d16df96052592d0983e16;p=php Don't forget these EOF flags either... --- diff --git a/main/network.c b/main/network.c index 243851171f..59217e7302 100644 --- a/main/network.c +++ b/main/network.c @@ -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) {