Little problem in php_stream_copy_to_stream:
When copying the whole fstream the result is zero - should be size....
See patch.

marcus

diff -u -w -r1.23 streams.c
--- main/streams.c      16 Mar 2002 18:52:03 -0000      1.23
+++ main/streams.c      16 Mar 2002 19:45:31 -0000
@@ -377,8 +377,12 @@
                                 writeptr += didwrite;
                         }
                 } else {
+                       if ( !maxlen) {
+                               return haveread;
+                       } else {
                         return 0; /* error */
                 }
+               }

                 if (maxlen - haveread == 0) {
                         break;



At 19:53 16.03.2002, Wez Furlong wrote:
>Damn; you're half right :-)
>
>Your seeker implementation should spot the offset=0 whence=SEEK_CUR
>case and return the current position.
>I've fixed the stdio stream implementation to do this.
>
>Please don't change the php_stream_ops structure, as there is no
>need.
>
>How are your memory streams implemented? (I was about to start on
>those!)
>
>--Wez.
>
>On 17/03/02, "Marcus Boerger" <[EMAIL PROTECTED]> wrote:
> > At the moment i am working at memory-streams....
> >
> > If have the following problem left:
> > I must extend
> > struct _php_stream_ops
> > with ftell....
> >
> > by the way php_stream_tell is wrong because it relies on seek and
> > that does return either 0 on success or an erroecode....
> >
> > regards
> > marcus
> >
> >
> >
> > --------->>> mailto:[EMAIL PROTECTED] <<<------------
> >          I don't want to start any blashphemous rumours
> >          but i think that god's got a sick sense of humor
> >          and when i die i expect to find him laughing.
> >                                               Depeche Mode
> > --------------->>> http://www.marcus-boerger.de <<<-------------------
>
>
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, visit: http://www.php.net/unsub.php


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

Reply via email to