diff options
author | Wayne Davison <wayned@samba.org> | 2005-04-09 18:59:55 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2005-04-09 18:59:55 +0000 |
commit | a0009fc30dc850fadc16a07ce7918759751d88ce (patch) | |
tree | a13367100ebeb901e33b4b72075c518ca6fd40b7 /receiver.c | |
parent | beb51aa09ef9d5d10956a4c1fcf7cd4f4449d018 (diff) | |
download | rsync-a0009fc30dc850fadc16a07ce7918759751d88ce.tar.gz rsync-a0009fc30dc850fadc16a07ce7918759751d88ce.tar.bz2 rsync-a0009fc30dc850fadc16a07ce7918759751d88ce.zip |
- 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.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -21,7 +21,7 @@ #include "rsync.h" extern int verbose; -extern int dry_run; +extern int do_xfers; extern int am_daemon; extern int am_server; extern int do_progress; @@ -30,6 +30,7 @@ extern int log_format_has_i; extern int daemon_log_format_has_i; extern int csum_length; extern int read_batch; +extern int write_batch; extern int batch_gen_fd; extern int protocol_version; extern int relative_paths; @@ -452,13 +453,18 @@ int recv_files(int f_in, struct file_list *flist, char *local_name) exit_cleanup(RERR_PROTOCOL); } - if (dry_run) { /* log the transfer */ + if (!do_xfers) { /* log the transfer */ if (!am_server && log_format) log_item(file, &stats, iflags, NULL); if (read_batch) discard_receive_data(f_in, file->length); continue; } + if (write_batch < 0) { + log_item(file, &stats, iflags, NULL); + discard_receive_data(f_in, file->length); + continue; + } if (read_batch) { next_gen_i = get_next_gen_i(batch_gen_fd, next_gen_i, i); |