Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

compat.c File Reference

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


Function Documentation

void setup_protocol int    f_out,
int    f_in
 

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 }


Variable Documentation

int am_server
 

Definition at line 28 of file compat.c.

int preserve_links
 

Definition at line 30 of file compat.c.

int preserve_perms
 

Definition at line 31 of file compat.c.

int preserve_devices
 

Definition at line 32 of file compat.c.

int preserve_uid
 

Definition at line 33 of file compat.c.

int preserve_gid
 

Definition at line 34 of file compat.c.

int preserve_times
 

Definition at line 35 of file compat.c.

int always_checksum
 

Definition at line 36 of file compat.c.

int checksum_seed
 

Definition at line 37 of file compat.c.

Referenced by get_checksum2(), setup_protocol(), and sum_init().

int remote_version
 

Definition at line 40 of file compat.c.

Referenced by setup_protocol().

int verbose
 

Definition at line 41 of file compat.c.

int read_batch
 

Definition at line 43 of file compat.c.

Referenced by setup_protocol().

int write_batch
 

Definition at line 44 of file compat.c.

Referenced by setup_protocol().


Generated on Tue Apr 16 12:37:38 2002 for rsync by doxygen1.2.15