Commit Graph

226 Commits

Author SHA1 Message Date
Wayne Davison
a0456b9c46 Protocol 30 now uses MD5 checksums instead of MD4. 2007-03-18 06:00:53 +00:00
Wayne Davison
1c3344a105 The ACL support has arrived! This version has a brand new protocol
that makes it incompatible with all prior versions.  A patch will be
provided to allow talking with older (patched) rsync versions.
2007-03-11 00:13:34 +00:00
Wayne Davison
be91bd81b8 Improved the incremental sending of file lists in two ways: (1)
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.
2007-02-16 02:35:31 +00:00
Wayne Davison
ba2133d6ad Further modifications to the copyright comment section. 2007-02-04 14:54:58 +00:00
Wayne Davison
121bfb2b4d The ndx arg passed to increment_active_files() is now the unique,
over-the-wire value, making it consistent with the ndx arg that
is passed to decrement_active_files().
2007-02-03 05:13:14 +00:00
Wayne Davison
100018b7cd Mention the year 2007 in the copyright declarations. 2007-01-31 21:46:49 +00:00
Wayne Davison
04c722d5e0 - Renamed done_cnt -> msgdone_cnt.
- 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).
2007-01-30 03:57:52 +00:00
Wayne Davison
2a5df86299 - Fixed a potential hang bug in wait_for_receiver() that could occur
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.
2007-01-27 16:30:33 +00:00
Wayne Davison
3ea6e0e7a1 Changed the variable "incremental" to "inc_recurse". 2007-01-27 14:56:09 +00:00
Wayne Davison
cc7b86bf9b The last MSG_DONE from the receiver to the generator is now followed
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.
2007-01-27 14:34:15 +00:00
Wayne Davison
3be97bf931 - Make sure that we can't write via io_flush() when msg_fd_in is
temporarily set to -1.
- Got rid of the msg2genr message cache.
2007-01-20 22:10:14 +00:00
Wayne Davison
4afab31607 We need to call msg2sndr_flush() in read_msg_fd() now. 2007-01-20 20:19:24 +00:00
Wayne Davison
be21e29c35 Make sure defer_forwarding_messages is set when msg_fd_in gets
set to -1.
2007-01-20 19:56:03 +00:00
Wayne Davison
dde5b77226 - My use of readfd_unbuffered() in read_msg_fd() really needed to be
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.
2006-12-29 00:12:42 +00:00
Wayne Davison
8a65e0ce00 Added write_ndx() and read_ndx(), functions that allow us to transmit
fewer bytes when exchanging the file-list index values.
2006-12-28 18:49:08 +00:00
Wayne Davison
8ef246e0b5 - Handle the new incremental-recursion mode.
- Changed some function names to make them more consistent.
2006-12-28 07:54:27 +00:00
Wayne Davison
c09af06d0c Made the int_byte_cnt[] array 75% smaller. 2006-12-27 17:43:51 +00:00
Wayne Davison
e10664c5e8 Moved the write_stream_flags() call from io.c into main.c so that
it gets called before the transfer starts (thus ensuring that it
can write out un-tweaked values of preserver_[ug]id vars).
2006-12-18 06:56:30 +00:00
Wayne Davison
64119c792d Added MSG_CLIENT to the acceptable messages the generator can
get from the receiver.
2006-12-10 14:55:44 +00:00
Wayne Davison
1e1ca25343 #ifdef calls to hard-link functions. 2006-12-06 01:32:17 +00:00
Wayne Davison
112d728f48 Use the latest F_*() accessors. 2006-12-05 15:59:58 +00:00
Wayne Davison
155d9206a4 Added send_msg_int() function. 2006-12-04 02:07:30 +00:00
Wayne Davison
4ea4acf17b - Added checking of SIZEOF_INT64 to the new code in read_longint().
- Improved the SIZEOF_INT64 checking code in write_longint().
2006-11-24 18:35:00 +00:00
Wayne Davison
3a993aa4bf - Changed {read,write}_shortint() to use unsigned short.
- Added explicit char-casting to new long-int code.
2006-11-24 17:28:57 +00:00
Wayne Davison
482f48cca9 - Fixed a bug when sending a negative 64-bit number (which may not
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.
2006-11-24 08:38:44 +00:00
Wayne Davison
54b0dfa0f7 Explicitly cast the tag value in read_msg_fd() to an enum. 2006-11-21 08:36:06 +00:00
Wayne Davison
4a19c3b254 Added "const" to appropriate char pointers. 2006-11-19 00:23:21 +00:00
Wayne Davison
6c8507724b Added exception-checking to a couple select() calls, as suggested
by Hugh Daschbach.
2006-09-30 22:11:20 +00:00
Wayne Davison
47c1197534 Decided that I like remove-source-files better than remove-sender-files. 2006-06-30 15:52:52 +00:00
Wayne Davison
044ccbaacf The remove_sent_files var was renamed to remove_sender_files. 2006-06-30 15:42:32 +00:00
Wayne Davison
12ccc73ae7 Changed read_msg_fd() to always use send_msg()/rwrite() instead of
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).
2006-05-03 16:17:46 +00:00
Wayne Davison
ee8d9636d1 A small optimization to the new code in msg2sndr_flush(). 2006-05-03 06:32:59 +00:00
Wayne Davison
229e1950ed Fixed a bug where deferred MSG_INFO/MSG_ERROR/MSG_LOG messages were
not being forwarded from the generator to the sender using rwrite()
(and MSG_LOG messages didn't need to be deferred at all).
2006-05-03 05:19:01 +00:00
Wayne Davison
e7c67065c0 Updated the FSF's address to an even newer one. 2006-04-25 23:51:12 +00:00
Wayne Davison
0f78b81511 - Updated the address for the FSF in the opening comment.
- 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).
2006-04-25 20:23:34 +00:00
Wayne Davison
b88c2e8ffe - Got rid of the (mostly useless) io_read_phase and io_write_phase
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.
2006-04-21 16:40:19 +00:00
Wayne Davison
f8b9da1a2c Output the who_am_i() info in the "unknown message" error. 2006-03-28 06:12:18 +00:00
Wayne Davison
a7704777ce An extra safeguard for msg2sndr_flush(). 2006-03-16 10:08:08 +00:00
Wayne Davison
7d51b8374d Made the new msg2sndr handling even better. 2006-03-16 09:57:32 +00:00
Wayne Davison
5b51c893c5 Optimized the reacquisition of the code value from the msg2sndr list. 2006-03-16 02:26:27 +00:00
Wayne Davison
408e69396c Fixed the reacquisition of the code value from the msg2sndr list. 2006-03-16 01:27:26 +00:00
Wayne Davison
954bbed84a - Optimized the msg_list_item structure to make the buffer an
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).
2006-03-16 00:57:54 +00:00
Wayne Davison
c638caa63e In read_sum_head(): if we read a negative checksum count, die
with an error.
2006-02-27 03:12:26 +00:00
Wayne Davison
cca9208697 Got rid of unused externs. 2006-02-24 16:43:44 +00:00
Wayne Davison
9a0cfff57f Don't try to obey bwlimit restriction until bwlimit_writemax is set.
This fixes a bug with option errors not getting reported because the
write code gets called with bwlimit != 0 and bwlimit_writemax == 0.
2006-02-20 17:50:36 +00:00
Wayne Davison
5b98629747 Improved the while's logic in increment_active_files(). 2006-02-15 08:26:51 +00:00
Wayne Davison
d6081c829c Added increment_active_files() and decrement_active_files() which
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.
2006-02-15 08:05:31 +00:00
Wayne Davison
12bda6f710 Don't do so much memory copying in mplex_write(). 2006-02-04 21:52:32 +00:00
Wayne Davison
72f2d1b384 When complaining about a socket-read problem, use an FSOCKERR
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.
2006-02-01 19:35:17 +00:00
Wayne Davison
d8aeda1e50 Changed a few "ret" variables to have better names. 2006-02-01 19:24:28 +00:00