I am teetering on a -1 for this patch. You are hacking around a more
fundamental problem.
If we cannot fix problems like this w/o impacting the performance of all
applications that
need to read files, then APR is seriously broken.
Bill
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 8:58 PM
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) {
>
>
>
>