helly Thu Oct 6 17:31:15 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/main/streams memory.c
Log:
- MFH Fix issue (endless loop) with temp/memory streams
http://cvs.php.net/diff.php/php-src/main/streams/memory.c?r1=1.6&r2=1.6.2.1&ty=u
Index: php-src/main/streams/memory.c
diff -u php-src/main/streams/memory.c:1.6 php-src/main/streams/memory.c:1.6.2.1
--- php-src/main/streams/memory.c:1.6 Thu Jan 8 03:17:59 2004
+++ php-src/main/streams/memory.c Thu Oct 6 17:31:15 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: memory.c,v 1.6 2004/01/08 08:17:59 andi Exp $ */
+/* $Id: memory.c,v 1.6.2.1 2005/10/06 21:31:15 helly Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -313,7 +313,13 @@
ts = stream->abstract;
assert(ts != NULL);
- return php_stream_read(ts->innerstream, buf, count);
+ size_t got = php_stream_read(ts->innerstream, buf, count);
+
+ if (!got) {
+ stream->eof |= ts->innerstream->eof;
+ }
+
+ return got;
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php