-
- 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_int(f_out, i);
+ if (itemize_changes)
+ write_byte(f_out, iflags);
+ write_sum_head(f_out, s);
+
+ if (verbose > 2) {
+ rprintf(FINFO, "calling match_sums %s\n",
+ safe_fname(fname));
+ }
+
+ if (log_before_transfer)
+ log_send(file, &initial_stats, iflags);
+ else if (!am_server && verbose && (!log_format || do_progress))
+ rprintf(FINFO, "%s\n", safe_fname(fname2));
+
+ set_compression(fname);
+
+ match_sums(f_out, s, mbuf, st.st_size);
+ if (!log_before_transfer)
+ log_send(file, &initial_stats, iflags);
+
+ if (mbuf) {
+ j = unmap_file(mbuf);
+ if (j) {
+ io_error |= IOERR_GENERAL;
+ rsyserr(FERROR, j,
+ "read errors mapping %s",
+ full_fname(fname));
+ }