DBGIO(0, (stderr, "==>\tfdSize(%p) rc %ld\n", fd, (long)rc));
#endif
FDSANE(fd);
- if (fd->contentLength >= 0)
- rc = fd->contentLength;
- else switch (fd->urlType) {
+ switch (fd->urlType) {
case URL_IS_PATH:
case URL_IS_UNKNOWN:
if (fstat(Fileno(fd), &sb) == 0)
fd->fps[0].fdno = -1;
fd->rd_timeoutsecs = 1; /* XXX default value used to be -1 */
- fd->contentLength = fd->bytesRemain = -1;
+ fd->bytesRemain = -1;
fd->syserrno = 0;
fd->errcookie = NULL;
fd->stats = xcalloc(1, sizeof(*fd->stats));
fdSetIo(fd, ufdio);
fd->rd_timeoutsecs = timeout;
- fd->contentLength = fd->bytesRemain = -1;
+ fd->bytesRemain = -1;
fd->urlType = urlType;
if (Fileno(fd) < 0) {
int rd_timeoutsecs; /* ufdRead: per FD_t timer */
ssize_t bytesRemain; /* ufdio: */
- ssize_t contentLength; /* ufdio: */
int syserrno; /* last system errno encountered */
const void *errcookie; /* gzdio/bzdio/ufdio: */
/** \ingroup rpmio
*/
static inline
-void fdSetContentLength(FD_t fd, ssize_t contentLength)
-{
- FDSANE(fd);
- fd->contentLength = fd->bytesRemain = contentLength;
-}
-
-/** \ingroup rpmio
- */
-static inline
void fdPush(FD_t fd, FDIO_t io, void * fp, int fdno)
{
FDSANE(fd);