httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <grega...@raleigh.ibm.com>
Subject [PATCH] mod_file_cache - use iol_sendfile directly
Date Mon, 17 Jul 2000 22:25:11 GMT
Change mod_file_cache to invoke iol_sendfile directly, rather than via ap_send_fd.  Also
incorporate uncommitted changes to fix a warning & remove an extra semicolon.

Greg

Index: modules/standard/mod_file_cache.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/modules/standard/mod_file_cache.c,v
retrieving revision 1.17
diff -u -d -b -r1.17 mod_file_cache.c
--- mod_file_cache.c    2000/07/10 21:49:22     1.17
+++ mod_file_cache.c    2000/07/17 22:14:20
@@ -388,7 +388,7 @@
         ap_send_mmap (file->mm, r, 0, file->finfo.size);
     }
     else {
-        long length;
+        ap_size_t length;
         ap_off_t offset;
         while (ap_each_byterange(r, &offset, &length)) {
             ap_send_mmap(file->mm, r, offset, length);
@@ -397,7 +397,7 @@
 #endif
     return OK;
 }
-
+#if 0
 static int sendfile_handler(request_rec *r, a_file *file, int rangestatus)
 {
 #if APR_HAS_SENDFILE
@@ -422,11 +422,12 @@
 #endif
     return OK;
 }
-#if 0
+#endif
+
 static int sendfile_handler(request_rec *r, a_file *file, int rangestatus)
 {
 #if APR_HAS_SENDFILE
-    long length;
+    ap_size_t length;
     ap_off_t offset = 0;
     struct iovec iov;
     ap_hdtr_t hdtr;
@@ -491,7 +492,6 @@
 #endif
     return OK;
 }
-#endif
 
 static int file_cache_handler(request_rec *r) 
 {
@@ -559,7 +559,7 @@
     ap_hook_translate_name(file_cache_xlat, aszPre, NULL, AP_HOOK_MIDDLE); 
     */
 
-};
+}
 
 static const handler_rec file_cache_handlers[] =
 {

Mime
View raw message