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
don't need PIPE_BUF any more
[rsync/rsync.git]
/
receiver.c
diff --git
a/receiver.c
b/receiver.c
index
6647c68
..
b9199f2
100644
(file)
--- a/
receiver.c
+++ b/
receiver.c
@@
-254,10
+254,12
@@
static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
rprintf(FINFO,"chunk[%d] of size %d at %.0f offset=%.0f\n",
i,len,(double)offset2,(double)offset);
rprintf(FINFO,"chunk[%d] of size %d at %.0f offset=%.0f\n",
i,len,(double)offset2,(double)offset);
- map = map_ptr(buf,offset2,len);
+ if (buf) {
+ map = map_ptr(buf,offset2,len);
- see_token(map, len);
- sum_update(map,len);
+ see_token(map, len);
+ sum_update(map,len);
+ }
if (fd != -1 && write_file(fd,map,len) != len) {
rprintf(FERROR,"write failed on %s : %s\n",
if (fd != -1 && write_file(fd,map,len) != len) {
rprintf(FERROR,"write failed on %s : %s\n",
@@
-267,7
+269,7
@@
static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
offset += len;
}
offset += len;
}
- end_progress();
+ end_progress(
total_size
);
if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
rprintf(FERROR,"write failed on %s : %s\n",
if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
rprintf(FERROR,"write failed on %s : %s\n",