Wayne Davison [Sat, 17 Jul 2004 15:20:00 +0000 (15:20 +0000)]
Revamped some of the io variables and calls to make the various I/O
functions seemlessly work on fds that aren't for the main socket. This
involved changing some fd-variable names (to make them clearer), adding
io_set_sock_fds(), and making input buffering have a better enabled
flag (via an allocated buffer, just like the output buffering). I also
got rid of the fd arg to some functions where the fd arg could only
specify the input or output fd for the socket (which we already know).
Wayne Davison [Fri, 16 Jul 2004 18:04:23 +0000 (18:04 +0000)]
- Limit the maximum block size we compute for a file.
- Set max_map_size based on the current file's block size (so that
map_ptr() is more efficient with large blocks).
Wayne Davison [Wed, 14 Jul 2004 07:20:18 +0000 (07:20 +0000)]
Improved the write_batch_argvs_file() routine so that it doesn't
need the character buffers and so that it properly removes the
hostname from the destination arg.
Wayne Davison [Fri, 2 Jul 2004 18:13:53 +0000 (18:13 +0000)]
Moved the verbose message about renaming the finished file down into
finish_transfer() so that it only gets output when we're actually going
to rename the file.
Wayne Davison [Sun, 20 Jun 2004 19:51:19 +0000 (19:51 +0000)]
Restored the code in the IPV6_V6ONLY section that checks the
return value from setsockopt() with one improvement: if the
user has used --ipv6 (-6) we don't discard the IPv6 socket.
This should help people using older Linux kernels that don't
implement IPv6 support quite right.
Wayne Davison [Mon, 14 Jun 2004 15:09:36 +0000 (15:09 +0000)]
If --partial was specified, make sure that make_backup is turned
off during the second (retry) phase of the transfer to avoid
making a second backup of a file (which would lose the original).
Wayne Davison [Sun, 13 Jun 2004 14:18:48 +0000 (14:18 +0000)]
Added a short msleep() after option_error() before we exit. This
ensures that the remote client has time to read our error message
while it is trying to write data to us before it gets a socket
error.
Wayne Davison [Sat, 12 Jun 2004 18:22:39 +0000 (18:22 +0000)]
- Changed some FERROR log calls to FLOG.
- Improved the option-error-reporting to actually get the error back
to the user (by getting I/O multiplexing started).
Wayne Davison [Fri, 11 Jun 2004 07:40:57 +0000 (07:40 +0000)]
- Made readlink_stat() and link_stat() optionally follow a symlink
to a dir. This fixes deletions inside "kept" symlinked dirs.
- Call link_stat() with its new arg (for --keep-dirlinks support).
Wayne Davison [Tue, 8 Jun 2004 22:18:04 +0000 (22:18 +0000)]
- Made the maximum-fd computation prior to a select() use the same idiom
in both the read and write code (also use a better variable name).
- Made the bytes-available code at the end of the select() loop use the
same flow of control in the read and the write code.
Wayne Davison [Mon, 7 Jun 2004 22:51:14 +0000 (22:51 +0000)]
Improved rwrite() in two ways:
- We no longer assume that the buffer is null terminated (daemon
mode would ignore the len when logging a message).
- Errors in daemon mode are now sent to both the log and the user.
Wayne Davison [Sun, 6 Jun 2004 19:15:58 +0000 (19:15 +0000)]
- Got rid of some useless calls to msg_list_push().
- Added a couple checks to ensure that the receiver doesn't mix two
clashing kinds of writes on the msg_fd_out pipe.
- Made sure that the read code in the receiver flushes the msg_fd_out
pipe, if needed.
Wayne Davison [Sun, 6 Jun 2004 19:02:09 +0000 (19:02 +0000)]
Make sure our select calls don't sleep for over one minute at a time,
even when io_timeout is a longer value (though the code in options.c
might set it to a shorter value if io_timeout is small).