apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH] tweaks to apr_sendfile() for Solaris
Date Thu, 26 Jul 2001 15:27:52 GMT
(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.

>             /* If this is the second time and we now got a successful write,
>              * yet still received EAGAIN, we don't wait again.
>              */
>             if (!arv && apr_is_option_set(sock->netmask, APR_SO_TIMEOUT) ==
1)
>             {
>                 apr_status_t t = apr_wait_for_io_or_timeout(sock, 0);

Mime
View raw message