cvs commit: src/libexec/ftpd ftpd.c
yar at FreeBSD.org
Wed Jan 19 02:33:20 PST 2005
yar 2005-01-19 10:33:20 UTC
FreeBSD src repository
Improve handling SIGURG and OOB commands on the control channel.
The major change is to process STAT sent as an OOB command w/o
breaking the current data transfer. As a side effect, this gives
better error checking in the code performing data transfers.
A lesser, but in no way cosmetic, change is using the flag `recvurg'
in the only signal-safe way that has been blessed by SUSv3. The
other flag, `transflag,' becomes private to the SIGURG machinery,
serves debugging purposes only, and may be dropped in the future.
The `byte_count' global variable is now accounting bytes actually
transferred over the network. This can give status messages looking
strange, like "X of Y bytes transferred," where X > Y, but that has
more sense than trying to compensate for combinations of data formats
on the server and client when transferring ASCII type data. BTW,
getting the size of a file in advance is unreliable for a number of
reasons in the first place. See question 18.8 of the Infrequently
Asked Questions in comp.lang.c for details.
Tested by: Nick Leuta (earlier versions), a stress-testing tool (final)
MFC after: 1 month
Revision Changes Path
1.202 +269 -134 src/libexec/ftpd/ftpd.c
More information about the cvs-src