*** empty log message ***
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index 43d5533..fad433a 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -21,6 +21,8 @@
 
 #include "rsync.h"
 
+extern int csum_length;
+
 extern int verbose;
 extern int am_server;
 extern int always_checksum;
@@ -137,7 +139,7 @@ void send_file_entry_v11(struct file_struct *file,int f)
 #endif
 
   if (always_checksum) {
-    write_buf(f,file->sum,SUM_LENGTH);
+    write_buf(f,file->sum,csum_length);
   }       
 
   last_mode = file->mode;
@@ -199,7 +201,7 @@ void receive_file_entry_v11(struct file_struct *file,
 #endif
   
   if (always_checksum)
-    read_buf(f,file->sum,SUM_LENGTH);
+    read_buf(f,file->sum,csum_length);
   
   last_mode = file->mode;
   last_dev = file->dev;
@@ -409,7 +411,7 @@ struct file_list *send_file_list(int f,int recurse,int argc,char *argv[])
     if (dir && *dir) {
       if (getcwd(dbuf,MAXPATHLEN-1) == NULL) {
        fprintf(stderr,"getwd : %s\n",strerror(errno));
-       exit(1);
+       exit_cleanup(1);
       }
       if (chdir(dir) != 0) {
        fprintf(stderr,"chdir %s : %s\n",dir,strerror(errno));
@@ -422,7 +424,7 @@ struct file_list *send_file_list(int f,int recurse,int argc,char *argv[])
       flist_dir = NULL;
       if (chdir(dbuf) != 0) {
        fprintf(stderr,"chdir %s : %s\n",dbuf,strerror(errno));
-       exit(1);
+       exit_cleanup(1);
       }
       continue;
     }