char *buf;
int i;
- if (verbose > 2)
+ if (verbose > 2) {
fprintf(stderr,"recv_files(%d) starting\n",flist->count);
+ }
if (recurse && delete_mode && !local_name && flist->count>0) {
delete_files(flist);
/* recv file data */
receive_data(f_in,buf,fd2,fname);
- if (fd1 != -1) close(fd1);
+ if (fd1 != -1) {
+ unmap_file(buf,st.st_size);
+ close(fd1);
+ }
close(fd2);
if (verbose > 2)
cleanup_fname = NULL;
- unmap_file(buf,st.st_size);
-
set_perms(fname,&flist->files[i],NULL,0);
}
while (1)
{
+ read_check(f_in);
+
i = read_int(f_in);
if (i == -1) break;
if (!am_server && verbose)
printf("%s\n",fname);
- match_sums(f_out,s,buf,st.st_size);
+ match_sums(f_out,s,buf,st.st_size,f_in);
write_flush(f_out);
unmap_file(buf,st.st_size);