Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 43859 invoked by uid 500); 5 Jul 2001 00:58:56 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 43848 invoked by uid 500); 5 Jul 2001 00:58:56 -0000 Delivered-To: apmail-apr-util-cvs@apache.org Date: 5 Jul 2001 00:58:56 -0000 Message-ID: <20010705005856.43844.qmail@apache.org> From: rbb@apache.org To: apr-util-cvs@apache.org Subject: cvs commit: apr-util/buckets apr_buckets_file.c rbb 01/07/04 17:58:56 Modified: buckets apr_buckets_file.c Log: We need to ALWAYS do the seek if we are reading from the file. This is unfortunate from a performance perspective, but right now, I can have an offset of 0 in the bucket, but be referring to a file that has been read from. If we don't seek before reading from the bucket, we get invalid data. Revision Changes Path 1.49 +4 -6 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.48 retrieving revision 1.49 diff -u -d -b -w -u -r1.48 -r1.49 --- apr_buckets_file.c 2001/06/27 20:15:01 1.48 +++ apr_buckets_file.c 2001/07/05 00:58:56 1.49 @@ -163,12 +163,10 @@ buf = malloc(*len); /* Handle offset ... */ - if (fileoffset) { rv = apr_file_seek(f, APR_SET, &fileoffset); if (rv != APR_SUCCESS) { free(buf); return rv; - } } rv = apr_file_read(f, buf, len); if (rv != APR_SUCCESS && rv != APR_EOF) {