compat.c

ソースコードを見る。


関数

void setup_protocol (int f_out, int f_in)

変数

int remote_protocol = 0
int verbose
int am_server
int inplace
int fuzzy_basis
int read_batch
int checksum_seed
int basis_dir_cnt
int prune_empty_dirs
int protocol_version
char * dest_option

関数

void setup_protocol ( int  f_out,
int  f_in 
)

compat.c41 行で定義されています。

参照先 am_serverbasis_dir_cntchecksum_seeddest_optionFERRORFINFOfuzzy_basisinplaceprotocol_versionprune_empty_dirsread_batchread_int()remote_protocolrprintf()verbosewrite_int().

参照元 client_run()rsync_module()start_server().

00042 {
00043         if (remote_protocol == 0) {
00044                 if (!read_batch)
00045                         write_int(f_out, protocol_version);
00046                 remote_protocol = read_int(f_in);
00047                 if (protocol_version > remote_protocol)
00048                         protocol_version = remote_protocol;
00049         }
00050         if (read_batch && remote_protocol > protocol_version) {
00051                 rprintf(FERROR, "The protocol version in the batch file is too new (%d > %d).\n",
00052                         remote_protocol, protocol_version);
00053                 exit_cleanup(RERR_PROTOCOL);
00054         }
00055 
00056         if (verbose > 3) {
00057                 rprintf(FINFO, "(%s) Protocol versions: remote=%d, negotiated=%d\n",
00058                         am_server? "Server" : "Client", remote_protocol, protocol_version);
00059         }
00060         if (remote_protocol < MIN_PROTOCOL_VERSION
00061          || remote_protocol > MAX_PROTOCOL_VERSION) {
00062                 rprintf(FERROR,"protocol version mismatch -- is your shell clean?\n");
00063                 rprintf(FERROR,"(see the rsync man page for an explanation)\n");
00064                 exit_cleanup(RERR_PROTOCOL);
00065         }
00066         if (remote_protocol < OLD_PROTOCOL_VERSION) {
00067                 rprintf(FINFO,"%s is very old version of rsync, upgrade recommended.\n",
00068                         am_server? "Client" : "Server");
00069         }
00070         if (protocol_version < MIN_PROTOCOL_VERSION) {
00071                 rprintf(FERROR, "--protocol must be at least %d on the %s.\n",
00072                         MIN_PROTOCOL_VERSION, am_server? "Server" : "Client");
00073                 exit_cleanup(RERR_PROTOCOL);
00074         }
00075         if (protocol_version > PROTOCOL_VERSION) {
00076                 rprintf(FERROR, "--protocol must be no more than %d on the %s.\n",
00077                         PROTOCOL_VERSION, am_server? "Server" : "Client");
00078                 exit_cleanup(RERR_PROTOCOL);
00079         }
00080 
00081         if (protocol_version < 29) {
00082                 if (fuzzy_basis) {
00083                         rprintf(FERROR,
00084                             "--fuzzy requires protocol 29 or higher"
00085                             " (negotiated %d).\n",
00086                             protocol_version);
00087                         exit_cleanup(RERR_PROTOCOL);
00088                 }
00089 
00090                 if (basis_dir_cnt && inplace) {
00091                         rprintf(FERROR,
00092                             "%s with --inplace requires protocol 29 or higher"
00093                             " (negotiated %d).\n",
00094                             dest_option, protocol_version);
00095                         exit_cleanup(RERR_PROTOCOL);
00096                 }
00097 
00098                 if (basis_dir_cnt > 1) {
00099                         rprintf(FERROR,
00100                             "Using more than one %s option requires protocol"
00101                             " 29 or higher (negotiated %d).\n",
00102                             dest_option, protocol_version);
00103                         exit_cleanup(RERR_PROTOCOL);
00104                 }
00105 
00106                 if (prune_empty_dirs) {
00107                         rprintf(FERROR,
00108                             "--prune-empty-dirs requires protocol 29 or higher"
00109                             " (negotiated %d).\n",
00110                             protocol_version);
00111                         exit_cleanup(RERR_PROTOCOL);
00112                 }
00113         }
00114 
00115         if (am_server) {
00116                 if (!checksum_seed)
00117                         checksum_seed = time(NULL);
00118                 write_int(f_out, checksum_seed);
00119         } else {
00120                 checksum_seed = read_int(f_in);
00121         }
00122 }


変数

int remote_protocol = 0

compat.c28 行で定義されています。

参照元 setup_protocol()start_daemon()start_inband_exchange().

int verbose

options.c163 行で定義されています。

int am_server

options.c75 行で定義されています。

int inplace

options.c116 行で定義されています。

参照元 finish_transfer()receive_data()recv_files()recv_generator()send_files()server_options()setup_protocol().

int fuzzy_basis

options.c104 行で定義されています。

参照元 recv_generator()server_options()setup_protocol().

int read_batch

options.c139 行で定義されています。

参照元 client_run()do_cmd()itemize()main()parse_arguments()recv_files()recv_generator()set_io_timeout()setup_protocol()start_client().

int checksum_seed

options.c115 行で定義されています。

int basis_dir_cnt

options.c160 行で定義されています。

参照元 parse_arguments()recv_files()server_options()setup_protocol().

int prune_empty_dirs

options.c86 行で定義されています。

参照元 clean_flist()recv_filter_list()send_filter_list()server_options()setup_protocol().

int protocol_version

mdfour.c209 行で定義されています。

char* dest_option

options.c161 行で定義されています。

参照元 parse_arguments()server_options()setup_protocol().


rsyncに対してSat Dec 5 19:45:43 2009に生成されました。  doxygen 1.4.7