Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Protocol 30 now uses MD5 checksums instead of MD4.
[rsync/rsync.git]
/
receiver.c
diff --git
a/receiver.c
b/receiver.c
index
3b3c51e
..
f7db385
100644
(file)
--- a/
receiver.c
+++ b/
receiver.c
@@
-125,11
+125,11
@@
int get_tmpname(char *fnametmp, char *fname)
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
char *fname, int fd, OFF_T total_size)
{
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
char *fname, int fd, OFF_T total_size)
{
- static char file_sum1[M
D4_SUM_LENGTH
];
- static char file_sum2[M
D4_SUM_LENGTH
];
+ static char file_sum1[M
AX_DIGEST_LEN
];
+ static char file_sum2[M
AX_DIGEST_LEN
];
struct map_struct *mapbuf;
struct sum_struct sum;
struct map_struct *mapbuf;
struct sum_struct sum;
- int32 len;
+ int32 len
, sum_len
;
OFF_T offset = 0;
OFF_T offset2;
char *data;
OFF_T offset = 0;
OFF_T offset2;
char *data;
@@
-257,15
+257,15
@@
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
exit_cleanup(RERR_FILEIO);
}
exit_cleanup(RERR_FILEIO);
}
- sum_end(file_sum1);
+ sum_
len = sum_
end(file_sum1);
if (mapbuf)
unmap_file(mapbuf);
if (mapbuf)
unmap_file(mapbuf);
- read_buf(f_in,
file_sum2,MD4_SUM_LENGTH
);
+ read_buf(f_in,
file_sum2, sum_len
);
if (verbose > 2)
rprintf(FINFO,"got file_sum\n");
if (verbose > 2)
rprintf(FINFO,"got file_sum\n");
- if (fd != -1 && memcmp(file_sum1, file_sum2,
MD4_SUM_LENGTH
) != 0)
+ if (fd != -1 && memcmp(file_sum1, file_sum2,
sum_len
) != 0)
return 0;
return 1;
}
return 0;
return 1;
}