- log_send(file, &initial_stats);
-
- if (buf) unmap_file(buf);
+ if (log_before_transfer)
+ log_item(FCLIENT, file, &initial_stats, iflags, NULL);
+ else if (!am_server && verbose && do_progress)
+ rprintf(FCLIENT, "%s\n", fname);
+
+ set_compression(fname);
+
+ match_sums(f_xfer, s, mbuf, st.st_size);
+ if (do_progress)
+ 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));
+ }
+ }