-
- if (verbose > 2)
- rprintf(FINFO,"send_files mapped %s of size %d\n",
- fname,(int)st.st_size);
-
- log_send(file);
-
- write_int(f_out,i);
-
- write_int(f_out,s->count);
- write_int(f_out,s->n);
- write_int(f_out,s->remainder);
-
- if (verbose > 2)
- rprintf(FINFO,"calling match_sums %s\n",fname);
-
- if (!am_server) {
- log_transfer(file, fname+offset);
+
+ write_ndx_and_attrs(f_out, ndx, iflags, fname, file,
+ fnamecmp_type, xname, xlen);
+ write_sum_head(f_xfer, s);
+
+ if (DEBUG_GTE(CHKSUM, 2))
+ rprintf(FINFO, "calling match_sums %s%s%s\n", path,slash,fname);
+
+ if (log_before_transfer)
+ log_item(FCLIENT, file, &initial_stats, iflags, NULL);
+ else if (!am_server && INFO_GTE(NAME, 1) && INFO_EQ(PROGRESS, 1))
+ rprintf(FCLIENT, "%s\n", fname);
+
+ set_compression(fname);
+
+ match_sums(f_xfer, s, mbuf, st.st_size);
+ if (INFO_GTE(PROGRESS, 1))
+ end_progress(st.st_size);
+
+ log_item(log_code, file, &initial_stats, iflags, NULL);
+
+ if (mbuf) {
+ j = unmap_file(mbuf);
+ if (j) {
+ io_error |= IOERR_GENERAL;
+ rsyserr(FERROR_XFER, j,
+ "read errors mapping %s",
+ full_fname(fname));
+ }