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.
be needed, but it at least works right now).
- Improved the transmission of 32-bit negative numbers on systems
where the 32-bit type is larger than 32 bits.
- Changed the sending of 64-bit numbers for protocol 30: we send
them in MSB-first order with the number of bytes used in the
transmission encoded into the earliest bits. This lets us save
transmitted bytes for both small and large numbers. The new
method sends from 3 to 9 bytes, the old sent either 4 or 12.
sometimes calling io_multiplex_write()/rwrite() or msg_list_add().
This simplifies the code that does the defer_forwarding_messages
checking because it can now be done in just one place, in send_msg()
(because rwrite() also calls send_msg() now when forwarding a msg).
- Standardized the format of the opening comment, including adding a
brief description of what's in the file for those that lacked it.
- Added some missing copyright lines.
- Some minor whitespace tweaks (in a few of the files).
variables. In the future it might be useful to get rsync to
mention what kind of a message it was trying to write, but the
'phase "unknown"' output was ubiquitous and confusing.
- Got rid of the completely unused write_int_named() function.
integral part of the structure instead of pointer to a
separately allocated buffer.
- Improved the code that was ensuring that no messages from the
receiver could be merged into the middle of a partially written
buffer from the generator. The new code ensures that we never
avoid reading the messages from the receiver (like we used to).
This ensures that the generator will not hang when the receiver
got a read error on the socket, sent us a message about it, but
the socket in the generator never becomes writable for it to get
a similar error (now we are assured of getting the receiver's
note about their read error, and we know to shut things down).
code instead of a normal FERROR. The generator is the only
process that will receive this, and it uses it to close down
the multi-I/O over the socket so that it won't ever hang trying
to write an error down a dead socket.