Re: cvs: php4 /main network.c
| From: | derick@php.net | Date: | Mon, 18 Mar 2002 22:22:41 +0000 |
| Subject: | Re: cvs: php4 /main network.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-10382@lists.php.net to get a copy of this message | ||
On Mon, 18 Mar 2002, Wez Furlong wrote:
> Hi Derick,
>
> in fsock.c: php_sockread_internal(); the code fits straight into
> the equivalent "if (nr_bytes > 0) {" part of the function.
Ok, I merged it, please check both my commit messages.
Derick
>
> --Wez.
>
> On 19/03/02, derick@php.net wrote:
> > Hello Wez,
> >
> > Exactly where should I add it... I can't find the relevent part in the
> > source?
> >
> > Derick
> >
> > > > nr_bytes = recv(sock->socket, buf, sock->chunk_size, 0);
> > > > if(nr_bytes > 0) {
> > > > +
> > > > + /* try to avoid ever expanding buffer */
> > > > + if (sock->readpos > 0) {
> > > > + memmove(sock->readbuf, READPTR(sock), sock->readbuflen -
> > > > sock->readpos);
> > > > + sock->writepos -= sock->readpos;
> > > > + sock->readpos = 0;
> > > > + }
> > > > +
> > > > if(sock->writepos + nr_bytes > sock->readbuflen) {
> > > > sock->readbuflen += sock->chunk_size;
> > > > sock->readbuf = perealloc(sock->readbuf, sock->readbuflen,
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-----------------------------------------------------------------------
PHP: Scripting the Web - derick@php.net
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
-----------------------------------------------------------------------