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: httpd-2.0/modules/cache mod_file_cache.c
Date Tue, 27 Mar 2001 00:34:06 GMT
Should mod_file_cache simply punt if neither APR_HAS_SENDFILE nor
APR_HAS_MMAP is available? Does the module provide useful service without
either of those?  (e.g. caching open file handles?)

Cheers,
-g

On Mon, Mar 26, 2001 at 07:11:10PM -0000, trawick@apache.org wrote:
> trawick     01/03/26 11:11:09
> 
>   Modified:    modules/cache mod_file_cache.c
>   Log:
>   Get mod_file_cache to compile again on platforms with no apr_sendfile().
>   
>   Get the Tru64 compiler to shut up about an incompatibility between void **
>   and struct **.
>   
>   Revision  Changes    Path
>   1.51      +4 -2      httpd-2.0/modules/cache/mod_file_cache.c
>   
>   Index: mod_file_cache.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/cache/mod_file_cache.c,v
>   retrieving revision 1.50
>   retrieving revision 1.51
>   diff -u -r1.50 -r1.51
>   --- mod_file_cache.c	2001/03/26 18:01:17	1.50
>   +++ mod_file_cache.c	2001/03/26 19:11:09	1.51
>   @@ -164,7 +164,7 @@
>    
>        /* Iterate over the file hash table and clean up each entry */
>        for (hi = apr_hash_first(sconf->fileht); hi; hi=apr_hash_next(hi)) {
>   -        apr_hash_this(hi, NULL, NULL, &file);
>   +        apr_hash_this(hi, NULL, NULL, (void **)&file);
>    #if APR_HAS_MMAP
>            if (file->is_mmapped) { 
>    	    apr_mmap_delete(file->mm);
>   @@ -224,11 +224,13 @@
>            apr_file_close(fd);
>            new_file->is_mmapped = TRUE;
>        }
>   +#if APR_HAS_SENDFILE
>        else {
>            /* CacheFile directive. Caching the file handle */
>            new_file->is_mmapped = FALSE;
>            new_file->file = fd;
>        }
>   +#endif
>    
>        new_file->filename = fspec;
>        apr_rfc822_date(new_file->mtimestr, new_file->finfo.mtime);
>   @@ -250,7 +252,7 @@
>    #else
>        /* Sendfile not supported by this OS */
>        ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
>   -                 "mod_file_cache: unable to cache file: %s. Sendfile is not supported
on this OS", fspec);
>   +                 "mod_file_cache: unable to cache file: %s. Sendfile is not supported
on this OS", filename);
>    #endif
>        return NULL;
>    }
>   
>   
>   

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

Mime
View raw message