extern int csum_length;
extern struct stats stats;
extern int dry_run;
+extern int read_batch;
+extern int batch_gen_fd;
extern int am_server;
extern int relative_paths;
extern int keep_dirlinks;
* Receiver process runs on the same host as the generator process. */
int recv_files(int f_in, struct file_list *flist, char *local_name)
{
+ int next_gen_i = -1;
int fd1,fd2;
STRUCT_STAT st;
char *fname, fbuf[MAXPATHLEN];
i = read_int(f_in);
if (i == -1) {
+ if (read_batch) {
+ if (next_gen_i != flist->count)
+ while (read_int(batch_gen_fd) != -1) {}
+ next_gen_i = -1;
+ }
+
if (phase)
break;
fnamecmp = fname;
+ if (read_batch) {
+ while (i > next_gen_i) {
+ next_gen_i = read_int(batch_gen_fd);
+ if (next_gen_i == -1)
+ next_gen_i = flist->count;
+ }
+ if (i < next_gen_i) {
+ rprintf(FINFO, "skipping update for \"%s\"\n",
+ fname);
+ discard_receive_data(f_in, file->length);
+ continue;
+ }
+ }
+
if (server_exclude_list.head
&& check_exclude(&server_exclude_list, fname,
S_ISDIR(file->mode)) < 0) {