- Renamed read_filesfrom_line() to read_line() and added args to allow
the caller to control how it works.
- Added a new function, read_args(), that reads args from a file
descriptor (using read_line()) and expands any wildcards in them.
This function has relocated daemon code (from clientserver.c) and
is also used by the new --protect-args (-s) option. The new code
also got rid of an extra strdup() that wasn't needed.
{read,write}_varlong() and {read,write}_longint() functions:
the former handles variable-length transmissions, and the
latter is backward-compatible with older rsync versions.
- Improved the {read,write}_var{int,long}() functions to be
simpler and to use a different byte order.
- The {read_write}_varlong() functions also allow the caller
to specify the minimum number of bytes to send. This allows
time values to be sent efficiently with a 4-byte minimum,
while length values continue to be sent with a (more optimal
for them) 3-byte minimum.
when the sender gets an index of a file to send, we make sure to
send enough future file-list data relative to the new cur_flist
value before we send the data for the file transfer (ensuring that
the generator gets the data in a more timely manner), and (2) the
generator flushes the output socket after each file-list object
has completed its scan so that the sender knows in a more timely
manner that more list data is needed.
- Changed increment_active_files() to call check_for_finished_files()
and to avoid calling both io_flush() and read_msg_fd() in the same
iteration of a loop (since the former may have called the latter).
if the io_flush() call happened to read the last message from the
receiver, causing the read_msg_fd() call to deadlock.
- Fixed an error-looping problem when the server-side receiver failed
to send a message down the error-msg pipe: we no longer try to send
a new error about this new failure down the same failing pipe.
- Make sure that we stop any deferring of forwarded messages in the
generator when we are exiting with an error.
by the stats.total_read value so that the generator can set its value
to that of the receiver. This makes log_exit() log the right value
when we're on the server side.
readfd() so that the buffer is never partially filled.
- Make sure that msg2genr_flush() does not flush any messages while
the flist-forwarding is active.
- Changed io_flush() to honor its flush_it_all arg again.