Re: cvs: php-src /main/streams streams.c
| From: | Wez Furlong | Date: | Wed, 06 Apr 2005 13:05:35 +0000 |
| Subject: | Re: cvs: php-src /main/streams streams.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-31256@lists.php.net to get a copy of this message | ||
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 <tony2001@php.net> 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
>
>