diff options
author | brianp <brianp@13f79535-47bb-0310-9956-ffa450edef68> | 2002-08-16 05:58:50 +0000 |
---|---|---|
committer | brianp <brianp@13f79535-47bb-0310-9956-ffa450edef68> | 2002-08-16 05:58:50 +0000 |
commit | 2656073b87653802dc943a578ddeac97a5b5c30b (patch) | |
tree | 06b1b4b82124bd75a7d60e9082e2f580b8deccd4 /buckets | |
parent | 66960aa55691d8fec218efe4cfc250310ee8dd1c (diff) | |
download | libapr-util-2656073b87653802dc943a578ddeac97a5b5c30b.tar.gz |
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.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@58733 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'buckets')
-rw-r--r-- | buckets/apr_buckets_file.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/buckets/apr_buckets_file.c b/buckets/apr_buckets_file.c index 864d97f7..302359d8 100644 --- a/buckets/apr_buckets_file.c +++ b/buckets/apr_buckets_file.c @@ -240,10 +240,6 @@ static apr_status_t file_bucket_setaside(apr_bucket *data, apr_pool_t *reqpool) 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 @@ static apr_status_t file_bucket_setaside(apr_bucket *data, apr_pool_t *reqpool) 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; } |