|
version 1.1.1.1, 2012/02/17 15:09:30
|
version 1.1.1.2, 2013/10/14 07:51:14
|
|
Line 3
|
Line 3
|
| * |
* |
| * Copyright (C) Andrew Tridgell 1996 |
* Copyright (C) Andrew Tridgell 1996 |
| * Copyright (C) Paul Mackerras 1996 |
* Copyright (C) Paul Mackerras 1996 |
| * Copyright (C) 2004-2009 Wayne Davison | * Copyright (C) 2004-2013 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 27 int inc_recurse = 0;
|
Line 27 int inc_recurse = 0;
|
| int compat_flags = 0; |
int compat_flags = 0; |
| int use_safe_inc_flist = 0; |
int use_safe_inc_flist = 0; |
| |
|
| extern int verbose; |
|
| extern int am_server; |
extern int am_server; |
| extern int am_sender; |
extern int am_sender; |
| extern int local_server; |
extern int local_server; |
|
Line 35 extern int inplace;
|
Line 34 extern int inplace;
|
| extern int recurse; |
extern int recurse; |
| extern int use_qsort; |
extern int use_qsort; |
| extern int allow_inc_recurse; |
extern int allow_inc_recurse; |
| |
extern int preallocate_files; |
| extern int append_mode; |
extern int append_mode; |
| extern int fuzzy_basis; |
extern int fuzzy_basis; |
| extern int read_batch; |
extern int read_batch; |
|
Line 55 extern char *partial_dir;
|
Line 55 extern char *partial_dir;
|
| extern char *dest_option; |
extern char *dest_option; |
| extern char *files_from; |
extern char *files_from; |
| extern char *filesfrom_host; |
extern char *filesfrom_host; |
| extern struct filter_list_struct filter_list; | extern filter_rule_list filter_list; |
| extern int need_unsorted_flist; |
extern int need_unsorted_flist; |
| #ifdef ICONV_OPTION |
#ifdef ICONV_OPTION |
| extern iconv_t ic_send, ic_recv; |
extern iconv_t ic_send, ic_recv; |
|
Line 163 void setup_protocol(int f_out,int f_in)
|
Line 163 void setup_protocol(int f_out,int f_in)
|
| exit_cleanup(RERR_PROTOCOL); |
exit_cleanup(RERR_PROTOCOL); |
| } |
} |
| |
|
| if (verbose > 3) { | if (DEBUG_GTE(PROTO, 1)) { |
| rprintf(FINFO, "(%s) Protocol versions: remote=%d, negotiated=%d\n", |
rprintf(FINFO, "(%s) Protocol versions: remote=%d, negotiated=%d\n", |
| am_server? "Server" : "Client", remote_protocol, protocol_version); |
am_server? "Server" : "Client", remote_protocol, protocol_version); |
| } |
} |
|
Line 190 void setup_protocol(int f_out,int f_in)
|
Line 190 void setup_protocol(int f_out,int f_in)
|
| if (read_batch) |
if (read_batch) |
| check_batch_flags(); |
check_batch_flags(); |
| |
|
| |
#ifndef SUPPORT_PREALLOCATION |
| |
if (preallocate_files && !am_sender) { |
| |
rprintf(FERROR, "preallocation is not supported on this %s\n", |
| |
am_server ? "Server" : "Client"); |
| |
exit_cleanup(RERR_SYNTAX); |
| |
} |
| |
#endif |
| |
|
| if (protocol_version < 30) { |
if (protocol_version < 30) { |
| if (append_mode == 1) |
if (append_mode == 1) |
| append_mode = 2; |
append_mode = 2; |
|
Line 285 void setup_protocol(int f_out,int f_in)
|
Line 293 void setup_protocol(int f_out,int f_in)
|
| read_batch ? "batch file" : "connection"); |
read_batch ? "batch file" : "connection"); |
| exit_cleanup(RERR_SYNTAX); |
exit_cleanup(RERR_SYNTAX); |
| } |
} |
| use_safe_inc_flist = !!(compat_flags & CF_SAFE_FLIST); | use_safe_inc_flist = (compat_flags & CF_SAFE_FLIST) || protocol_version >= 31; |
| need_messages_from_generator = 1; |
need_messages_from_generator = 1; |
| #ifdef CAN_SET_SYMLINK_TIMES |
#ifdef CAN_SET_SYMLINK_TIMES |
| } else if (!am_sender) { |
} else if (!am_sender) { |
|
Line 297 void setup_protocol(int f_out,int f_in)
|
Line 305 void setup_protocol(int f_out,int f_in)
|
| unsort_ndx = ++file_extra_cnt; |
unsort_ndx = ++file_extra_cnt; |
| |
|
| if (partial_dir && *partial_dir != '/' && (!am_server || local_server)) { |
if (partial_dir && *partial_dir != '/' && (!am_server || local_server)) { |
| int flags = MATCHFLG_NO_PREFIXES | MATCHFLG_DIRECTORY; | int rflags = FILTRULE_NO_PREFIXES | FILTRULE_DIRECTORY; |
| if (!am_sender || protocol_version >= 30) |
if (!am_sender || protocol_version >= 30) |
| flags |= MATCHFLG_PERISHABLE; | rflags |= FILTRULE_PERISHABLE; |
| parse_rule(&filter_list, partial_dir, flags, 0); | parse_filter_str(&filter_list, partial_dir, rule_template(rflags), 0); |
| } |
} |
| |
|
| |
|