extern int am_server;
extern int am_daemon;
extern int protocol_version;
+extern int updating_basis_file;
extern int make_backups;
+extern int inplace;
extern struct stats stats;
* and transmits them to the receiver. The sender process runs on the
* machine holding the source files.
**/
-void read_sum_head(int f, struct sum_struct *sum)
-{
- sum->count = read_int(f);
- sum->blength = read_int(f);
- if (protocol_version < 27) {
- sum->s2length = csum_length;
- } else {
- sum->s2length = read_int(f);
- if (sum->s2length > MD4_SUM_LENGTH) {
- rprintf(FERROR, "Invalid checksum length %ld\n",
- (long)sum->s2length);
- exit_cleanup(RERR_PROTOCOL);
- }
- }
- sum->remainder = read_int(f);
-}
/**
* Receive the checksums for a buffer
s->sums = NULL;
if (verbose > 3) {
- rprintf(FINFO, "count=%ld n=%u rem=%u\n",
- (long)s->count, s->blength, s->remainder);
+ rprintf(FINFO, "count=%.0f n=%ld rem=%ld\n",
+ (double)s->count, (long)s->blength, (long)s->remainder);
}
if (s->count == 0)
exit_cleanup(RERR_PROTOCOL);
}
+ if (inplace && protocol_version >= 29) {
+ uchar fnamecmp_type = read_byte(f_in);
+ updating_basis_file = fnamecmp_type == FNAMECMP_FNAME;
+ } else
+ updating_basis_file = inplace && !make_backups;
+
file = flist->files[i];
stats.current_file_index = i;
}
if (st.st_size) {
- OFF_T map_size = MAX(s->blength * 3, MAX_MAP_SIZE);
- mbuf = map_file(fd, st.st_size, map_size, s->blength);
+ int32 read_size = MAX(s->blength * 3, MAX_MAP_SIZE);
+ mbuf = map_file(fd, st.st_size, read_size, s->blength);
} else
mbuf = NULL;