Commit 044ccbaa authored by Wayne Davison's avatar Wayne Davison

The remove_sent_files var was renamed to remove_sender_files.

parent 841d9436
......@@ -46,7 +46,7 @@ extern int read_batch;
extern int csum_length;
extern int checksum_seed;
extern int protocol_version;
extern int remove_sent_files;
extern int remove_sender_files;
extern int preserve_hard_links;
extern char *filesfrom_host;
extern struct stats stats;
......@@ -257,7 +257,7 @@ static void read_msg_fd(void)
exit_cleanup(RERR_STREAMIO);
}
read_loop(fd, buf, 4);
if (remove_sent_files)
if (remove_sender_files)
decrement_active_files(IVAL(buf,0));
flist_ndx_push(&redo_list, IVAL(buf,0));
break;
......@@ -275,7 +275,7 @@ static void read_msg_fd(void)
exit_cleanup(RERR_STREAMIO);
}
read_loop(fd, buf, len);
if (remove_sent_files) {
if (remove_sender_files) {
decrement_active_files(IVAL(buf,0));
send_msg(MSG_SUCCESS, buf, len);
}
......@@ -311,7 +311,7 @@ static void read_msg_fd(void)
}
/* This is used by the generator to limit how many file transfers can
* be active at once when --remove-sent-files is specified. Without
* be active at once when --remove-sender-files is specified. Without
* this, sender-side deletions were mostly happening at the end. */
void increment_active_files(int ndx, int itemizing, enum logcode code)
{
......
......@@ -35,7 +35,7 @@ extern int am_sender;
extern int am_generator;
extern int am_daemon;
extern int blocking_io;
extern int remove_sent_files;
extern int remove_sender_files;
extern int daemon_over_rsh;
extern int need_messages_from_generator;
extern int kluge_around_eof;
......@@ -614,9 +614,10 @@ static void do_server_sender(int f_in, int f_out, int argc, char *argv[])
exit_cleanup(RERR_SYNTAX);
return;
}
if (am_daemon && lp_read_only(module_id) && remove_sent_files) {
if (am_daemon && lp_read_only(module_id) && remove_sender_files) {
rprintf(FERROR,
"ERROR: --remove-sent-files cannot be used with a read-only module\n");
"ERROR: --remove-%s-files cannot be used with a read-only module\n",
remove_sender_files == 1 ? "sender" : "sent");
exit_cleanup(RERR_SYNTAX);
return;
}
......
......@@ -40,7 +40,7 @@ extern int preserve_perms;
extern int basis_dir_cnt;
extern int make_backups;
extern int cleanup_got_literal;
extern int remove_sent_files;
extern int remove_sender_files;
extern int append_mode;
extern int sparse_files;
extern int keep_partial;
......@@ -296,7 +296,7 @@ static void handle_delayed_updates(struct file_list *flist, char *local_name)
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
if (remove_sent_files
if (remove_sender_files
|| (preserve_hard_links
&& file->link_u.links)) {
SIVAL(numbuf, 0, i);
......@@ -644,7 +644,7 @@ int recv_files(int f_in, struct file_list *flist, char *local_name)
cleanup_disable();
if (recv_ok > 0) {
if (remove_sent_files
if (remove_sender_files
|| (preserve_hard_links && file->link_u.links)) {
SIVAL(numbuf, 0, i);
send_msg(MSG_SUCCESS, numbuf, 4);
......
......@@ -34,7 +34,7 @@ extern int append_mode;
extern int io_error;
extern int allowed_lull;
extern int protocol_version;
extern int remove_sent_files;
extern int remove_sender_files;
extern int updating_basis_file;
extern int make_backups;
extern int do_progress;
......@@ -128,16 +128,13 @@ void successful_send(int ndx)
return;
file = the_file_list->files[ndx];
/* The generator might tell us about symlinks we didn't send. */
if (!(file->flags & FLAG_SENT) && !S_ISLNK(file->mode))
return;
if (file->dir.root) {
offset = stringjoin(fname, sizeof fname,
file->dir.root, "/", NULL);
} else
offset = 0;
f_name(file, fname + offset);
if (remove_sent_files && do_unlink(fname) == 0 && verbose > 1)
if (remove_sender_files && do_unlink(fname) == 0 && verbose > 1)
rprintf(FINFO, "sender removed %s\n", fname + offset);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment