- fix: chunked davRead returns 0 is EOF.
authorjbj <devnull@localhost>
Thu, 25 Nov 2004 04:45:10 +0000 (04:45 +0000)
committerjbj <devnull@localhost>
Thu, 25 Nov 2004 04:45:10 +0000 (04:45 +0000)
CVS patchset: 7600
CVS date: 2004/11/25 04:45:10

CHANGES
rpm.spec.in
rpmio/rpmio.c

diff --git a/CHANGES b/CHANGES
index b91236f..28f5c49 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -36,6 +36,7 @@
        - bump soname into libfoo-4.4.so everywhere.
        - sparcv8: optflags changed to -mtune=ultrasparc (#140420).
        - add BuildRequires: neon-devel.
+       - fix: chunked davRead returns 0 is EOF.
 
 4.3.2 -> 4.3.3:
        - bump micro version.
index e05f0bb..50c4c0e 100644 (file)
@@ -20,7 +20,7 @@ Name: rpm
 %define version @VERSION@
 Version: %{version}
 %{expand: %%define rpm_version %{version}}
-Release: 0.5
+Release: 0.6
 Group: System Environment/Base
 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
 License: GPL
@@ -495,6 +495,9 @@ exit 0
 %{__includedir}/popt.h
 
 %changelog
+* Wed Nov 24 2004 Jeff Johnson <jbj@jbj.org> 4.4-0.6
+- fix: chunked davRead returns 0 is EOF.
+
 * Mon Nov 22 2004 Jeff Johnson <jbj@jbj.org> 4.4-0.5
 - sparcv8: optflags changed to -mtune=ultrasparc (#140420).
 - add BuildRequires: neon-devel.
index 9a838c5..e69f797 100644 (file)
@@ -369,9 +369,12 @@ static ssize_t fdRead(void * cookie, /*@out@*/ char * buf, size_t count)
     fdstat_enter(fd, FDSTAT_READ);
 /*@-boundswrite@*/
     /* HACK: flimsy wiring for davRead */
-    if (fd->req != NULL)
+    if (fd->req != NULL) {
        rc = davRead(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
-    else
+       /* XXX Chunked davRead EOF. */
+       if (rc == 0)
+           fd->bytesRemain = 0;
+    } else
        rc = read(fdFileno(fd), buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
 /*@=boundswrite@*/
     fdstat_exit(fd, FDSTAT_READ, rc);