+ if (inc_recurse && first_flist) {
+ if (read_batch) {
+ ndx = first_flist->used + first_flist->ndx_start;
+ gen_wants_ndx(ndx, first_flist->flist_num);
+ }
+ flist_free(first_flist);
+ if (first_flist)
+ continue;
+ } else if (read_batch && first_flist) {
+ ndx = first_flist->used;
+ gen_wants_ndx(ndx, first_flist->flist_num);
+ }
+ if (++phase > max_phase)
+ break;
+ if (DEBUG_GTE(RECV, 1))
+ rprintf(FINFO, "recv_files phase=%d\n", phase);
+ if (phase == 2 && delay_updates)
+ handle_delayed_updates(local_name);
+ write_int(f_out, NDX_DONE);
+ continue;
+ }
+
+ if (ndx - cur_flist->ndx_start >= 0)
+ file = cur_flist->files[ndx - cur_flist->ndx_start];
+ else
+ file = dir_flist->files[cur_flist->parent_ndx];
+ fname = local_name ? local_name : f_name(file, fbuf);
+
+ if (DEBUG_GTE(RECV, 1))
+ rprintf(FINFO, "recv_files(%s)\n", fname);
+
+#ifdef SUPPORT_XATTRS
+ if (iflags & ITEM_REPORT_XATTR && do_xfers)
+ recv_xattr_request(file, f_in);
+#endif
+
+ if (!(iflags & ITEM_TRANSFER)) {
+ maybe_log_item(file, iflags, itemizing, xname);
+#ifdef SUPPORT_XATTRS
+ if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers)
+ set_file_attrs(fname, file, NULL, fname, 0);
+#endif
+ if (iflags & ITEM_IS_NEW) {
+ stats.created_files++;
+ if (S_ISREG(file->mode)) {
+ /* Nothing further to count. */
+ } else if (S_ISDIR(file->mode))
+ stats.created_dirs++;
+#ifdef SUPPORT_LINKS
+ else if (S_ISLNK(file->mode))
+ stats.created_symlinks++;
+#endif
+ else if (IS_DEVICE(file->mode))
+ stats.created_devices++;
+ else
+ stats.created_specials++;
+ }
+ continue;
+ }
+ if (phase == 2) {
+ rprintf(FERROR,
+ "got transfer request in phase 2 [%s]\n",
+ who_am_i());
+ exit_cleanup(RERR_PROTOCOL);