apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: [PATCH] tweaks to apr_sendfile() for Solaris
Date Thu, 26 Jul 2001 15:57:57 GMT
On Thu, Jul 26, 2001 at 11:27:52AM -0400, Jeff Trawick wrote:
> (normal e-mail machine busted; hope this doesn't go out as HTML or otherwise misformatted
:( )
> 
> >     arv = 0;
> >     do {
> >         /* Clear out the repeat */
> >         repeat = 0;
> > 
> >         /* socket, vecs, number of vecs, bytes written */
> >         rv = sendfilev(sock->socketdes, sfv, vecs, &nbytes);
> > 
> >         if (rv == -1 && errno == EAGAIN)
> >         {
> >             /* We wrote something successfully - see above */
> >             if (nbytes)
> >                 rv = 0;
> 
> Why call wait_for_io_or_timeout() after successfully sending bytes?  
> None of the other APR network routines work that way.  Maybe it won't
> break anything, but I'd prefer to keep everything as similarly
> structured as possible.

Brain fart.  =)  Read the next line as else if.  I kept changing the
logic around trying to consolidate it.

I didn't commit it because I knew I was going to have something 
stupid in it - there you go, something stupid *was* there.

Since Greg committed something similiar (except that -1/EAGAIN/0 causes
us to call sendfile() infinitely many times - that correct?), I'll 
commit this once I get in to the office.  -- justin


Mime
View raw message