aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* Added MSG_CLIENT to the acceptable messages the generator canWayne Davison2006-12-101-1/+3
| | | | get from the receiver.
* #ifdef calls to hard-link functions.Wayne Davison2006-12-061-0/+4
|
* Use the latest F_*() accessors.Wayne Davison2006-12-051-2/+2
|
* Added send_msg_int() function.Wayne Davison2006-12-041-0/+7
|
* - Added checking of SIZEOF_INT64 to the new code in read_longint().Wayne Davison2006-11-241-3/+20
| | | | - Improved the SIZEOF_INT64 checking code in write_longint().
* - Changed {read,write}_shortint() to use unsigned short.Wayne Davison2006-11-241-48/+48
| | | | - Added explicit char-casting to new long-int code.
* - Fixed a bug when sending a negative 64-bit number (which may notWayne Davison2006-11-241-28/+152
| | | | | | | | | | | 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.
* Explicitly cast the tag value in read_msg_fd() to an enum.Wayne Davison2006-11-211-1/+1
|
* Added "const" to appropriate char pointers.Wayne Davison2006-11-191-11/+11
|
* Added exception-checking to a couple select() calls, as suggestedWayne Davison2006-09-301-8/+21
| | | | by Hugh Daschbach.
* Decided that I like remove-source-files better than remove-sender-files.Wayne Davison2006-06-301-4/+4
|
* The remove_sent_files var was renamed to remove_sender_files.Wayne Davison2006-06-301-4/+4
|
* Changed read_msg_fd() to always use send_msg()/rwrite() instead ofWayne Davison2006-05-031-28/+13
| | | | | | | 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).
* A small optimization to the new code in msg2sndr_flush().Wayne Davison2006-05-031-1/+1
|
* Fixed a bug where deferred MSG_INFO/MSG_ERROR/MSG_LOG messages wereWayne Davison2006-05-031-3/+14
| | | | | not being forwarded from the generator to the sender using rwrite() (and MSG_LOG messages didn't need to be deferred at all).
* Updated the FSF's address to an even newer one.Wayne Davison2006-04-251-3/+3
|
* - Updated the address for the FSF in the opening comment.Wayne Davison2006-04-251-18/+12
| | | | | | | - 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).
* - Got rid of the (mostly useless) io_read_phase and io_write_phaseWayne Davison2006-04-211-25/+2
| | | | | | | 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.
* Output the who_am_i() info in the "unknown message" error.Wayne Davison2006-03-281-1/+2
|
* An extra safeguard for msg2sndr_flush().Wayne Davison2006-03-161-1/+1
|
* Made the new msg2sndr handling even better.Wayne Davison2006-03-161-14/+25
|
* Optimized the reacquisition of the code value from the msg2sndr list.Wayne Davison2006-03-161-1/+1
|
* Fixed the reacquisition of the code value from the msg2sndr list.Wayne Davison2006-03-161-1/+2
|
* - Optimized the msg_list_item structure to make the buffer anWayne Davison2006-03-161-46/+56
| | | | | | | | | | | | | | 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).
* In read_sum_head(): if we read a negative checksum count, dieWayne Davison2006-02-271-0/+5
| | | | with an error.
* Got rid of unused externs.Wayne Davison2006-02-241-1/+0
|
* Don't try to obey bwlimit restriction until bwlimit_writemax is set.Wayne Davison2006-02-201-2/+2
| | | | | This fixes a bug with option errors not getting reported because the write code gets called with bwlimit != 0 and bwlimit_writemax == 0.
* Improved the while's logic in increment_active_files().Wayne Davison2006-02-151-2/+1
|
* Added increment_active_files() and decrement_active_files() whichWayne Davison2006-02-151-1/+30
| | | | | | allows the generator to ask us to limit the number of files that are currently active in the transfer when --remove-sent-files is enabled.
* Don't do so much memory copying in mplex_write().Wayne Davison2006-02-041-5/+7
|
* When complaining about a socket-read problem, use an FSOCKERRWayne Davison2006-02-011-2/+11
| | | | | | | 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.
* Changed a few "ret" variables to have better names.Wayne Davison2006-02-011-51/+27
|
* Made msg_list_push() static and renamed it to msg_list_flush().Wayne Davison2005-12-081-13/+13
|
* Tweaked the msg_list code so that the head and tail pointersWayne Davison2005-12-081-17/+20
| | | | are contained by a structure.
* Fixed a typo in a comment.Wayne Davison2005-12-081-1/+1
|
* - Use BIGPATHBUFLEN for the length of several buffers.Wayne Davison2005-07-291-7/+8
| | | | | - If io_printf() tries to overflow the buffer, die with an error instead of sending a truncated buffer.
* - Added set_io_timeout(), which sets all the timeout-dependentWayne Davison2005-05-191-12/+26
| | | | | | variables when the timeout value changes. - Split last_io into last_io_in and last_io_out. - Made select_timeout static.
* Improved the use of the "remaining" var in readfd_unbuffered() toWayne Davison2005-05-121-23/+20
| | | | | make certain that the static value is always set correctly anytime we call out to another function.
* Got rid of some code from writefd_unbuffered() that was only neededWayne Davison2005-05-121-5/+0
| | | | back when the generator had a writeable pipe to the receiver.
* - Added maybe_flush_socket() for use by the generator.Wayne Davison2005-04-051-2/+9
| | | | - Always maintain the last_io value for the generator.
* Make sure that the line buffer in readfd_unbuffered() is largeWayne Davison2005-04-041-1/+5
| | | | | | enough to handle long-filename messages on a system that has a really short MAXPATHLEN value. Also, make it large enough to be able to comment on a MAXPATHLEN filename.
* In writefd_unbuffered(), make sure that we don't look at the r_fdsWayne Davison2005-04-041-4/+6
| | | | variable when we're ignoring msg_fd_in.
* - Made an overflow in read_vstring() return an error instead of dying.Wayne Davison2005-03-091-8/+2
| | | | - Got rid of a flush kluge that was needed for the name-pipe.
* - Made the sock_{in,out} variables non-static.Wayne Davison2005-03-051-20/+36
| | | | | | | | | - Added hlink_list, a FIFO list of finished hard-link items. - Made get_redo_num() check for finished hard-link items and call the generator when they are found. This ensures that we finish all the hard-link items by the time the MSG_DONE is read and returned to the generator. - Added get_hlink_num() to read the new hlink_list.
* Transformed the push/pop functions for the redo-list into moreWayne Davison2005-03-041-32/+44
| | | | | generic flist_num_{push,pop}() functions that can support other folks caching off file-list index numbers.
* Added read_vstring() and write_vstring() to io.c instead ofWayne Davison2005-03-041-0/+39
| | | | having this code in generator.c and receiver.c.
* - Got rid of the checking of msg_fd_in in read_timeout() -- it wasWayne Davison2005-03-041-15/+18
| | | | | | | | | | only needed back when the generator was reading a separate redo pipe from the message pipe. - Fixed a potential data corruption in the data that the generator is sending: if a message comes in from the receiver, we now make sure that we can't put the forwarding of this message to the sender into the middle of a multiplexed-write record that the generator is trying to flush.
* Changed remote_filesfrom_file to filesfrom_host.Wayne Davison2005-03-011-2/+2
|
* Don't loop forever when the receiver is waiting around to be killedWayne Davison2005-02-271-1/+3
| | | | | | at EOF -- it should be a rapidly arriving event, so only hang around for 10 seconds, max., and then go ahead and report the "unexpectedly closed" error.
* One more comment fix.Wayne Davison2005-02-261-13/+12
|