httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/src/main iol_socket.c
Date Thu, 06 Jul 2000 20:45:28 GMT
On Thu, Jul 06, 2000 at 01:06:17PM -0700, rbb@covalent.net wrote:
> On Thu, 6 Jul 2000, Ryan Bloom wrote:
> 
> > rbb         00/07/06 13:01:19
> > 
> >   Modified:    src/main iol_socket.c
> >   Log:
> 
> I did write a log for this.  ARGH!  Basically, we can't just assume APR is
> providing ap_sendfile.  Setting the sendfile pointer to ap_sendfile is
> only valid if APR_HAS_SENDFILE is true.

I don't understand this, then. The #if/#endif below assumes that
iol_sendfile *was* set and arrived at that function. *then* it switches on
the behavior.

Wouldn't you want to put the #if down in the socket_methods structure?

Cheers,
-g

> 
> 
> Ryan
> >   
> >   
> >   Revision  Changes    Path
> >   1.4       +5 -0      apache-2.0/src/main/iol_socket.c
> >   
> >   Index: iol_socket.c
> >   ===================================================================
> >   RCS file: /home/cvs/apache-2.0/src/main/iol_socket.c,v
> >   retrieving revision 1.3
> >   retrieving revision 1.4
> >   diff -u -r1.3 -r1.4
> >   --- iol_socket.c	2000/07/05 19:39:21	1.3
> >   +++ iol_socket.c	2000/07/06 20:01:18	1.4
> >   @@ -57,6 +57,7 @@
> >     */
> >    
> >    #define CORE_PRIVATE
> >   +#include "apr.h"
> >    #include "ap_config.h"
> >    #include "httpd.h"
> >    #include "ap_iol.h"
> >   @@ -135,7 +136,11 @@
> >                                       ap_hdtr_t *hdtr, ap_off_t *offset, 
> >                                       ap_size_t *len,  ap_int32_t flags) 
> >    {
> >   +#if APR_HAS_SENDFILE
> >        return ap_sendfile(((iol_socket *)viol)->sock, file, hdtr, offset, len,
flags);
> >   +#else
> >   +    return APR_ENOTIMPL;
> >   +#endif
> >    }
> >    
> >    static ap_status_t socket_close(ap_iol *viol)
> >   
> >   
> >   
> > 
> 
> 
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message