version 1.1.1.2, 2013/10/14 07:51:14
|
version 1.1.1.3, 2016/11/01 09:54:32
|
Line 3
|
Line 3
|
* |
* |
* Copyright (C) 1996-2000 Andrew Tridgell |
* Copyright (C) 1996-2000 Andrew Tridgell |
* Copyright (C) 1996 Paul Mackerras |
* Copyright (C) 1996 Paul Mackerras |
* Copyright (C) 2003-2013 Wayne Davison | * Copyright (C) 2003-2015 Wayne Davison |
* |
* |
* This program is free software; you can redistribute it and/or modify |
* 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 |
* it under the terms of the GNU General Public License as published by |
Line 30 extern int inc_recurse;
|
Line 30 extern int inc_recurse;
|
extern int log_before_transfer; |
extern int log_before_transfer; |
extern int stdout_format_has_i; |
extern int stdout_format_has_i; |
extern int logfile_format_has_i; |
extern int logfile_format_has_i; |
|
extern int want_xattr_optim; |
extern int csum_length; |
extern int csum_length; |
extern int read_batch; |
extern int read_batch; |
extern int write_batch; |
extern int write_batch; |
Line 61 extern char sender_file_sum[MAX_DIGEST_LEN];
|
Line 62 extern char sender_file_sum[MAX_DIGEST_LEN];
|
extern struct file_list *cur_flist, *first_flist, *dir_flist; |
extern struct file_list *cur_flist, *first_flist, *dir_flist; |
extern filter_rule_list daemon_filter_list; |
extern filter_rule_list daemon_filter_list; |
|
|
|
BOOL want_progress_now; |
|
|
static struct bitbag *delayed_bits = NULL; |
static struct bitbag *delayed_bits = NULL; |
static int phase = 0, redoing = 0; |
static int phase = 0, redoing = 0; |
static flist_ndx_list batch_redo_list; |
static flist_ndx_list batch_redo_list; |
Line 113 int get_tmpname(char *fnametmp, const char *fname, BOO
|
Line 116 int get_tmpname(char *fnametmp, const char *fname, BOO
|
} |
} |
} else |
} else |
f = fname; |
f = fname; |
if (*f == '.') /* avoid an extra leading dot for OS X's sake */ |
|
f++; |
|
fnametmp[length++] = '.'; |
|
|
|
|
if (!tmpdir) { /* using a tmpdir avoids the leading dot on our temp names */ |
|
if (*f == '.') /* avoid an extra leading dot for OS X's sake */ |
|
f++; |
|
fnametmp[length++] = '.'; |
|
} |
|
|
/* The maxname value is bufsize, and includes space for the '\0'. |
/* The maxname value is bufsize, and includes space for the '\0'. |
* NAME_MAX needs an extra -1 for the name's leading dot. */ |
* NAME_MAX needs an extra -1 for the name's leading dot. */ |
maxname = MIN(MAXPATHLEN - length - TMPNAME_SUFFIX_LEN, |
maxname = MIN(MAXPATHLEN - length - TMPNAME_SUFFIX_LEN, |
Line 298 static int receive_data(int f_in, char *fname_r, int f
|
Line 304 static int receive_data(int f_in, char *fname_r, int f
|
while ((i = recv_token(f_in, &data)) != 0) { |
while ((i = recv_token(f_in, &data)) != 0) { |
if (INFO_GTE(PROGRESS, 1)) |
if (INFO_GTE(PROGRESS, 1)) |
show_progress(offset, total_size); |
show_progress(offset, total_size); |
|
else if (want_progress_now) { |
|
rprintf(FINFO, "%s\n", fname); |
|
end_progress(offset); |
|
} |
|
want_progress_now = False; |
|
|
if (allowed_lull) |
if (allowed_lull) |
maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER); |
maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER); |
Line 581 int recv_files(int f_in, int f_out, char *local_name)
|
Line 592 int recv_files(int f_in, int f_out, char *local_name)
|
|
|
#ifdef SUPPORT_XATTRS |
#ifdef SUPPORT_XATTRS |
if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers |
if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers |
&& (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) | && !(want_xattr_optim && BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) |
recv_xattr_request(file, f_in); |
recv_xattr_request(file, f_in); |
#endif |
#endif |
|
|
Line 668 int recv_files(int f_in, int f_out, char *local_name)
|
Line 679 int recv_files(int f_in, int f_out, char *local_name)
|
} |
} |
} |
} |
|
|
if (!log_before_transfer) | remember_initial_stats(); |
remember_initial_stats(); | |
|
|
if (!do_xfers) { /* log the transfer */ |
if (!do_xfers) { /* log the transfer */ |
log_item(FCLIENT, file, iflags, NULL); |
log_item(FCLIENT, file, iflags, NULL); |