Go to the source code of this file.
Functions | |
void | setup_protocol (int f_out, int f_in) |
Variables | |
int | am_server |
int | preserve_links |
int | preserve_perms |
int | preserve_devices |
int | preserve_uid |
int | preserve_gid |
int | preserve_times |
int | always_checksum |
int | checksum_seed |
int | remote_version |
int | verbose |
int | read_batch |
int | write_batch |
|
Definition at line 46 of file compat.c. References checksum_init(), checksum_seed, FERROR, read_batch, read_int(), remote_version, rprintf(), write_batch, and write_int(). Referenced by client_run(), and start_server().
00047 { 00048 if (remote_version == 0) { 00049 if (am_server) { 00050 remote_version = read_int(f_in); 00051 write_int(f_out,PROTOCOL_VERSION); 00052 } else { 00053 write_int(f_out,PROTOCOL_VERSION); 00054 remote_version = read_int(f_in); 00055 } 00056 } 00057 00058 if (remote_version < MIN_PROTOCOL_VERSION || 00059 remote_version > MAX_PROTOCOL_VERSION) { 00060 rprintf(FERROR,"protocol version mismatch - is your shell clean?\n"); 00061 rprintf(FERROR,"(see the rsync man page for an explanation)\n"); 00062 exit_cleanup(RERR_PROTOCOL); 00063 } 00064 00065 if (remote_version >= 12) { 00066 if (am_server) { 00067 if (read_batch || write_batch) /* dw */ 00068 checksum_seed = 32761; 00069 else 00070 checksum_seed = time(NULL); 00071 write_int(f_out,checksum_seed); 00072 } else { 00073 checksum_seed = read_int(f_in); 00074 } 00075 } 00076 00077 checksum_init(); 00078 } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 37 of file compat.c. Referenced by get_checksum2(), setup_protocol(), and sum_init(). |
|
Definition at line 40 of file compat.c. Referenced by setup_protocol(). |
|
|
|
Definition at line 43 of file compat.c. Referenced by setup_protocol(). |
|
Definition at line 44 of file compat.c. Referenced by setup_protocol(). |