com php-src: we need to use the full stream wrapper for filters: ext/standard/php_fopen_wrapper.c
| From: | Michael Wallner | Date: | Tue, 17 Sep 2013 11:44:50 +0000 |
| Subject: | com php-src: we need to use the full stream wrapper for filters: ext/standard/php_fopen_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73233@lists.php.net to get a copy of this message | ||
Commit: 0f78d8612a7b16f1bbe3fb80a99896d7163c0aa7
Author: Michael Wallner <mike@php.net> Tue, 17 Sep 2013 13:44:02 +0200
Parents: 41d78110ffd576a9afa352426ed2c15ab7308bec
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0f78d8612a7b16f1bbe3fb80a99896d7163c0aa7
Log:
we need to use the full stream wrapper for filters
Changed paths:
M ext/standard/php_fopen_wrapper.c
Diff:
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index ca0b92e..f624cf4 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -73,8 +73,8 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count
{
php_stream *inner = stream->abstract;
- if (inner && inner->ops->read) {
- size_t read = inner->ops->read(inner, buf, count TSRMLS_CC);
+ if (inner) {
+ size_t read = php_stream_read(inner, buf, count);
stream->eof = inner->eof;
return read;
}
@@ -99,8 +99,10 @@ static int php_stream_input_seek(php_stream *stream, off_t offset, int whence, o
{
php_stream *inner = stream->abstract;
- if (inner && inner->ops->seek) {
- return inner->ops->seek(inner, offset, whence, newoffset TSRMLS_CC);
+ if (inner) {
+ int sought = php_stream_seek(inner, offset, whence);
+ *newoffset = inner->position;
+ return sought;
}
return -1;