*
* Copyright (C) 1998-2001 Andrew Tridgell <tridge@samba.org>
* Copyright (C) 2000-2001 Martin Pool <mbp@samba.org>
- * Copyright (C) 2003-2020 Wayne Davison
+ * Copyright (C) 2003-2022 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
extern int allow_8bit_chars;
extern int protocol_version;
extern int always_checksum;
-extern int preserve_times;
+extern int preserve_mtimes;
extern int msgs2stderr;
-extern int xfersum_type;
-extern int checksum_type;
extern int stdout_format_has_i;
extern int stdout_format_has_o_or_i;
extern int logfile_format_has_i;
extern char sender_file_sum[MAX_DIGEST_LEN];
extern const char undetermined_hostname[];
+extern struct name_num_item *xfer_sum_nni, *file_sum_nni;
+
static int log_initialised;
static int logfile_was_closed;
static FILE *logfile_fp;
n = NULL;
if (S_ISREG(file->mode)) {
if (always_checksum)
- n = sum_as_hex(checksum_type, F_SUM(file), 1);
+ n = sum_as_hex(file_sum_nni->num, F_SUM(file), 1);
else if (iflags & ITEM_TRANSFER)
- n = sum_as_hex(xfersum_type, sender_file_sum, 0);
+ n = sum_as_hex(xfer_sum_nni->num, sender_file_sum, 0);
}
if (!n) {
- int sum_len = csum_len_for_type(always_checksum ? checksum_type : xfersum_type,
+ int sum_len = csum_len_for_type(always_checksum ? file_sum_nni->num : xfer_sum_nni->num,
always_checksum);
memset(buf2, ' ', sum_len*2);
buf2[sum_len*2] = '\0';
c[1] = 'L';
c[3] = '.';
c[4] = !(iflags & ITEM_REPORT_TIME) ? '.'
- : !preserve_times || !receiver_symlink_times
+ : !preserve_mtimes || !receiver_symlink_times
|| (iflags & ITEM_REPORT_TIMEFAIL) ? 'T' : 't';
} else {
c[1] = S_ISDIR(file->mode) ? 'd'
: IS_DEVICE(file->mode) ? 'D' : 'f';
c[3] = !(iflags & ITEM_REPORT_SIZE) ? '.' : 's';
c[4] = !(iflags & ITEM_REPORT_TIME) ? '.'
- : !preserve_times ? 'T' : 't';
+ : !preserve_mtimes ? 'T' : 't';
}
c[2] = !(iflags & ITEM_REPORT_CHANGE) ? '.' : 'c';
c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';