What problem does this fix?
EOF can be a temporary condition for network streams, depending on
non-blocking status, and the read call is used to re-enable it.  (yay
for backward compatibility).

--Wez.

On Apr 6, 2005 4:26 AM, Antony Dovgal <[EMAIL PROTECTED]> wrote:
> tony2001                Wed Apr  6 04:26:06 2005 EDT
> 
>   Modified files:
>     /php-src/main/streams       streams.c
>   Log:
>   do not try to read after EOF
> 
> http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.73&r2=1.74&ty=u
> Index: php-src/main/streams/streams.c
> diff -u php-src/main/streams/streams.c:1.73 
> php-src/main/streams/streams.c:1.74
> --- php-src/main/streams/streams.c:1.73 Mon Apr  4 23:00:04 2005
> +++ php-src/main/streams/streams.c      Wed Apr  6 04:26:06 2005
> @@ -19,7 +19,7 @@
>     +----------------------------------------------------------------------+
>   */
> 
> -/* $Id: streams.c,v 1.73 2005/04/05 03:00:04 iliaa Exp $ */
> +/* $Id: streams.c,v 1.74 2005/04/06 08:26:06 tony2001 Exp $ */
> 
>  #define _GNU_SOURCE
>  #include "php.h"
> @@ -847,6 +847,10 @@
> 
>         php_stream_fill_read_buffer(stream, maxlen TSRMLS_CC);
> 
> +       if ((stream->writepos - stream->readpos)<=0) {
> +               return NULL;
> +       }
> +
>         if (delim_len == 0 || !delim) {
>                 toread = maxlen;
>         } else {
> 
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to