cvs: php4 /main streams.c
| From: | Wez Furlong | Date: | Thu, 13 Feb 2003 01:17:45 +0000 |
| Subject: | cvs: php4 /main streams.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-18741@lists.php.net to get a copy of this message | ||
wez Wed Feb 12 20:17:45 2003 EDT
Modified files:
/php4/main streams.c
Log:
Fix for Bug #21815 (fpassthru ignored buffered data but then complained anyway)
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.145 php4/main/streams.c:1.146
--- php4/main/streams.c:1.145 Sun Feb 9 15:43:05 2003
+++ php4/main/streams.c Wed Feb 12 20:17:45 2003
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.145 2003/02/09 20:43:05 iliaa Exp $ */
+/* $Id: streams.c,v 1.146 2003/02/13 01:17:45 wez Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -1029,6 +1029,7 @@
#ifdef HAVE_MMAP
if (!php_stream_is(stream, PHP_STREAM_IS_SOCKET)
&& stream->filterhead == NULL
+ && php_stream_tell(stream) == 0
&& SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, 0))
{
struct stat sbuf;
@@ -2047,7 +2048,7 @@
* know that they should try something else */
php_error_docref(NULL TSRMLS_CC, E_WARNING,
- "%d bytes of buffered data lost during conversion to FILE*!",
+ "%d bytes of buffered data lost during conversion!",
stream->writepos - stream->readpos);
}