You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by br...@apache.org on 2002/08/16 07:58:50 UTC

cvs commit: apr-util/buckets apr_buckets_file.c

brianp      2002/08/15 22:58:50

  Modified:    .        CHANGES
               buckets  apr_buckets_file.c
  Log:
  Changed file_bucket_setaside() to use apr_file_setaside() instead
  of turning the file bucket into an mmap bucket.  This will enable
  us to avoid an extraneous mmap in various cases where the httpd
  sets aside brigades.
  
  Revision  Changes    Path
  1.73      +3 -0      apr-util/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr-util/CHANGES,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- CHANGES	12 Aug 2002 17:30:11 -0000	1.72
  +++ CHANGES	16 Aug 2002 05:58:50 -0000	1.73
  @@ -1,5 +1,8 @@
   Changes with APR-util b1  
   
  +  *) Changed file_bucket_setaside() to use apr_file_setaside() instead
  +     of turning the file bucket into an mmap bucket.  [Brian Pane]
  +
     *) Install libaprutil support libraries before installing libaprutil
        itself, since on some platforms libaprutil is relinked during
        make install and the support libraries need to exist already.
  
  
  
  1.76      +1 -10     apr-util/buckets/apr_buckets_file.c
  
  Index: apr_buckets_file.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_file.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- apr_buckets_file.c	2 Jun 2002 19:54:49 -0000	1.75
  +++ apr_buckets_file.c	16 Aug 2002 05:58:50 -0000	1.76
  @@ -240,10 +240,6 @@
       apr_file_t *fd = NULL;
       apr_file_t *f = a->fd;
       apr_pool_t *curpool = apr_file_pool_get(f);
  -#if APR_HAS_MMAP
  -    apr_size_t filelength = data->length;  /* bytes remaining in file past offset */
  -    apr_off_t fileoffset = data->start;
  -#endif
   
       if (apr_pool_is_ancestor(curpool, reqpool)) {
           return APR_SUCCESS;
  @@ -253,12 +249,7 @@
           a->readpool = reqpool;
       }
   
  -#if APR_HAS_MMAP
  -    if (file_make_mmap(data, filelength, fileoffset, reqpool)) {
  -        return APR_SUCCESS;
  -    }
  -#endif
  -    apr_file_dup(&fd, f, reqpool);
  +    apr_file_setaside(&fd, f, reqpool);
       a->fd = fd;
       return APR_SUCCESS;
   }