Wayne Davison [Thu, 19 May 2005 08:52:24 +0000 (08:52 +0000)]
Periodically call maybe_send_keepalive() when timeouts are in effect
(this ensures that the receiver doesn't timeout when we're still
doing work reading data from the generator).
Wayne Davison [Thu, 19 May 2005 08:52:19 +0000 (08:52 +0000)]
- Call the new set_io_timeout() function to set the timeout value.
- If the user specified a shorter timeout than the config-file,
don't override the shorter value.
Wayne Davison [Thu, 19 May 2005 08:52:13 +0000 (08:52 +0000)]
- Added set_io_timeout(), which sets all the timeout-dependent
variables when the timeout value changes.
- Split last_io into last_io_in and last_io_out.
- Made select_timeout static.
Wayne Davison [Sat, 14 May 2005 18:44:57 +0000 (18:44 +0000)]
Treat a trailing ".." dir-name as if "../" had been specified so
that we don't use the name in the destination path and save files
into a higher destination directory.
Wayne Davison [Thu, 12 May 2005 17:36:29 +0000 (17:36 +0000)]
Improved the use of the "remaining" var in readfd_unbuffered() to
make certain that the static value is always set correctly anytime
we call out to another function.
Wayne Davison [Tue, 3 May 2005 15:59:24 +0000 (15:59 +0000)]
- Improved the comments on the backslash-escaped output, and moved it
to the top in an "OUTPUT CHANGES" section.
- Added a mention of the generator's new output-flushing optimization.
Wayne Davison [Wed, 27 Apr 2005 22:58:06 +0000 (22:58 +0000)]
Set ignore_timeout before starting the transfer, regardless of
what protocol level is in effect. This guards against the
generator timing out when the output pipe is full and the input
pipe (to the receiver) is slow.
Wayne Davison [Wed, 27 Apr 2005 22:56:47 +0000 (22:56 +0000)]
If the user specified --relative and a source dir with a trailing
slash, make sure we strip of the trailing "/." from the dir's len
(in del_hier_name_len) so that its subdirs get marked with
FLAG_DEL_HERE.
Wayne Davison [Tue, 26 Apr 2005 15:24:40 +0000 (15:24 +0000)]
Fixed problem with -C when we're the sender, the remote is using an
older protocol, and we're not sending the exclude list (i.e. the
user didn't specify --delete or they specified --delete-ignored).
Wayne Davison [Sun, 24 Apr 2005 22:11:26 +0000 (22:11 +0000)]
When deleting files, we need to take any local FLAG_MOUNT_POINT
flag-bit and put it into the regular flist's flags for that dir,
and delete_in_dir() now refuses to delete a directory that has
that bit set.
Wayne Davison [Sat, 23 Apr 2005 22:30:08 +0000 (22:30 +0000)]
When rsync encountered an empty file list, it behaved differently
when pulling files than when pushing files: pulling it output a
(mostly) unhelpful error message and then exited with a 0 status,
even when the remote side exited with an error code. I changed this
to output the normal end summary (when verbose) and to exit with the
status intact (just like when pushing files).
Wayne Davison [Sat, 23 Apr 2005 18:20:47 +0000 (18:20 +0000)]
Two more tests:
- Update the hard-linked cluster and copy over the old versions.
- Add a new hard-linked item down in a new subdir to make sure that
the new file doesn't get handled before the subdir gets created.
Wayne Davison [Sat, 23 Apr 2005 17:48:34 +0000 (17:48 +0000)]
- Added a new function, maybe_hard_link(), which now holds the code
(moved from hard_link_cluster()) that checks the inode/dev of an
existing file and either does nothing (when properly linked), or
removes the existing file before calling hard_link_one().
- Changed hard_link_check() so that it checks if the master item is
marked with FINISHED_LINK (in its hlindex int), and if so, it
finishes the current file by calling maybe_hard_link() (and
marking it as finished too). Otherwise it marks the item as
skipped by setting hlindex to SKIPPED_LINK.
- Fixed the outputting of an error in hard_link_one() so that the
message is always output when the caller did not request "terse"
processing.
- Changed hard_link_cluster() so that it marks the master item with
FINISHED_LINK and then links only the skipped items (marking them
with FINISHED_LINK too).
Wayne Davison [Fri, 22 Apr 2005 16:45:33 +0000 (16:45 +0000)]
If we're outputting a message about the remote file in a
single-file transfer, we need to make sure that the file's
name is the generic-transfer name and not a local name.
Wayne Davison [Fri, 15 Apr 2005 08:26:58 +0000 (08:26 +0000)]
- Fixed a potential crash/infinite-loop bug if -H was used
when sending a single file.
- Made a couple variable improvements in link_idev_data().
- Got rid of the non-NULL check of hlink_list in init_hard_links()
because is enough to just check file->link_u.links these days.
Wayne Davison [Thu, 14 Apr 2005 16:08:10 +0000 (16:08 +0000)]
- Changed log_open() into two functions, logfile_open() and
logfile_reopen().
- Changed log_close() into logfile_close().
- Improved the logic in logit().
Wayne Davison [Thu, 14 Apr 2005 01:45:47 +0000 (01:45 +0000)]
- Got rid of the iflag kluge for 2.6.4pre3.
- When we're handling --only-write-batch on the client side, we now
send all index/header info to the receiver (not just to the batch
file, like we do with the xfer data) so that the connection cannot
timeout.
Wayne Davison [Tue, 12 Apr 2005 23:03:49 +0000 (23:03 +0000)]
If we can't open the daemon's log file, fall-back to using
syslog (rather than trying to output an error on stderr,
which would usually be lost, and then exiting).
Wayne Davison [Sun, 10 Apr 2005 17:09:10 +0000 (17:09 +0000)]
Made the code a little cleaner by having gen_challenge() return
the challenge string base64-encoded (instead of forcing the caller
to handle this). Also improved a couple comments.
Wayne Davison [Sat, 9 Apr 2005 18:59:57 +0000 (18:59 +0000)]
- Use the new do_xfers variable in place of some dry_run checks
(with appropriate negation).
- If write_batch is < 0, we write out the file-transfer data to
just the batch file, not the socket.
Wayne Davison [Sat, 9 Apr 2005 18:59:55 +0000 (18:59 +0000)]
- Use the new do_xfers variable in place of some dry_run checks
(with appropriate negation).
- If we get a transfer when write_batch is < 0, discard it.
Wayne Davison [Sat, 9 Apr 2005 18:59:49 +0000 (18:59 +0000)]
- Only do read-/write-batch processing if we're not the server (needed
now that write_batch is no longer forced to 0 for the server).
- If write_batch is < 0, force "dry_run = 1" (but only after we've
finished any appropriate write-batch file creation).
Wayne Davison [Sat, 9 Apr 2005 18:11:23 +0000 (18:11 +0000)]
- Use the MD4_SUM_LENGTH define in place of some hard-wired values.
- Pass the hostname in to auth_server().
- Generate a unique error for each failure type in auth_server() so
that the log-file contains why the authorization failed.
- Don't use sscanf() to parse the client's auth-challenge response.