the filter write functions should return the number of bytes of
the input buffer that they *consumed*, not how many were written.
(The read function should of course return the number read, but cannot
exceed the maximum buffer size).

However, there also seems to be a similar sounding problem with the
user-space filters; I will investiage in more detail later this weekend,
if I get time.

--Wez.

On Sun, 5 Jan 2003 [EMAIL PROTECTED] wrote:

> Hi,
>
> I'm currently working on base64 filter, and then I'm stuck with odd
> behaviour of stream_filter_write op. When I try to write some larger
> chunk to the next output filter than the length of buffer passed to
> my function, stream segfaults sometimes or goes into infinite loops on
> other attempts in the next call of the write op.
>
> Is this just my fault that I should always limit chunk length within the range
> of the given length? Or possible stream bugs?
>
> Please try the attached patch and run the following script to reproduce the
> problem.
>
> <?php
> stream_filter_append(STDOUT, "string.segfaulting");
> fwrite(STDOUT, "test");
> ?>
>
> Thanks,
>
> Moriyoshi
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to