Call map_file() with its new block_size arg.
authorWayne Davison <wayned@samba.org>
Tue, 20 Jul 2004 21:35:46 +0000 (21:35 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 20 Jul 2004 21:35:46 +0000 (21:35 +0000)
checksum.c
sender.c

index ff9b1faa4ab9cce8cc50ad2ec9086e5deaee5b9b..fdec16f7c9ba81c10d39ca8c69bf5469de2fd0ff 100644 (file)
@@ -99,9 +99,10 @@ void file_checksum(char *fname,char *sum,OFF_T size)
        memset(sum,0,MD4_SUM_LENGTH);
        
        fd = do_open(fname, O_RDONLY, 0);
-       if (fd == -1) return;
+       if (fd == -1)
+               return;
        
-       buf = map_file(fd,size);
+       buf = map_file(fd, size, CSUM_CHUNK);
        
        mdfour_begin(&m);
 
index 688dff610046001133a9d72e7e447733b177f127..211aec25feccfa2282b6c0f6776dd90292810781 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -175,8 +175,7 @@ void send_files(struct file_list *flist, int f_out, int f_in)
 
                initial_stats = stats;
 
-               s = receive_sums(f_in);
-               if (!s) {
+               if (!(s = receive_sums(f_in))) {
                        io_error |= IOERR_GENERAL;
                        rprintf(FERROR, "receive_sums failed\n");
                        return;
@@ -210,7 +209,7 @@ void send_files(struct file_list *flist, int f_out, int f_in)
                        return;
                }
 
-               mbuf = st.st_size ? map_file(fd, st.st_size) : NULL;
+               mbuf = st.st_size ? map_file(fd, st.st_size, s->blength) : NULL;
 
                if (verbose > 2) {
                        rprintf(FINFO, "send_files mapped %s of size %.0f\n",