helly Thu Oct 6 17:31:25 2005 EDT
Modified files: (Branch: PHP_5_1)
/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.8&r2=1.8.2.1&ty=u
Index: php-src/main/streams/memory.c
diff -u php-src/main/streams/memory.c:1.8 php-src/main/streams/memory.c:1.8.2.1
--- php-src/main/streams/memory.c:1.8 Wed Aug 3 10:08:42 2005
+++ php-src/main/streams/memory.c Thu Oct 6 17:31:25 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: memory.c,v 1.8 2005/08/03 14:08:42 sniper Exp $ */
+/* $Id: memory.c,v 1.8.2.1 2005/10/06 21:31:25 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