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
added "created dir" message
[rsync/rsync.git]
/
rsync.c
diff --git
a/rsync.c
b/rsync.c
index
66e42a3
..
d9b7e61
100644
(file)
--- a/
rsync.c
+++ b/
rsync.c
@@
-486,8
+486,9
@@
int recv_files(int f_in,struct file_list *flist,char *local_name)
char *buf;
int i;
char *buf;
int i;
- if (verbose > 2)
+ if (verbose > 2)
{
fprintf(stderr,"recv_files(%d) starting\n",flist->count);
fprintf(stderr,"recv_files(%d) starting\n",flist->count);
+ }
if (recurse && delete_mode && !local_name && flist->count>0) {
delete_files(flist);
if (recurse && delete_mode && !local_name && flist->count>0) {
delete_files(flist);
@@
-560,7
+561,10
@@
int recv_files(int f_in,struct file_list *flist,char *local_name)
/* recv file data */
receive_data(f_in,buf,fd2,fname);
/* 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)
close(fd2);
if (verbose > 2)
@@
-583,8
+587,6
@@
int recv_files(int f_in,struct file_list *flist,char *local_name)
cleanup_fname = NULL;
cleanup_fname = NULL;
- unmap_file(buf,st.st_size);
-
set_perms(fname,&flist->files[i],NULL,0);
}
set_perms(fname,&flist->files[i],NULL,0);
}
@@
-611,6
+613,8
@@
off_t send_files(struct file_list *flist,int f_out,int f_in)
while (1)
{
while (1)
{
+ read_check(f_in);
+
i = read_int(f_in);
if (i == -1) break;
i = read_int(f_in);
if (i == -1) break;
@@
-676,7
+680,7
@@
off_t send_files(struct file_list *flist,int f_out,int f_in)
if (!am_server && verbose)
printf("%s\n",fname);
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);
write_flush(f_out);
unmap_file(buf,st.st_size);