[comp.archives] [unix-questions] Re: FTP 512 or 1024 byte blocks?

rsalz@bbn.com (Rich Salz) (11/19/90)

Archive-name: ftp/30-Oct-90
Original-posting-by: rsalz@bbn.com (Rich Salz)
Original-subject: Re: FTP 512 or 1024 byte blocks?
Archive-site: uunet.uu.net [192.48.96.2]
Archive-directory: /networking
Reposted-by: emv@ox.com (Edward Vielmetti)

In <847@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes:
.    Why is it that every manual I've seen about ftp, says that the hash
.option will cause the printing of a hash character every 1024 bytes
.received, yet every implementation of ftp I've used prints the hash
.every 512 bytes?
Because the code that implements the hash-mark printing is usually done
in a real sloppy manner:
	while ((i = read(socket, buffer, 1024)) > 0) {
	    if (hash_on)
		putchar('#');
	    write(newfile, buffer, i);
	}

This is fixed in the FTP available on uunet.uu.net in the directory ~/networking.
(That version has since had other fixes, like per-host macros, etc; email to me
if you can beta-test.)
	/r$
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.