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
preparing for release of 2.2.0
[rsync/rsync.git]
/
receiver.c
diff --git
a/receiver.c
b/receiver.c
index
794ef6e
..
189aa41
100644
(file)
--- a/
receiver.c
+++ b/
receiver.c
@@
-223,7
+223,7
@@
static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
if (fd != -1 && write_file(fd,data,i) != i) {
rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno));
if (fd != -1 && write_file(fd,data,i) != i) {
rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno));
- exit_cleanup(
1
);
+ exit_cleanup(
RERR_FILEIO
);
}
offset += i;
continue;
}
offset += i;
continue;
@@
-249,7
+249,7
@@
static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
if (fd != -1 && write_file(fd,map,len) != len) {
rprintf(FERROR,"write failed on %s : %s\n",
fname,strerror(errno));
if (fd != -1 && write_file(fd,map,len) != len) {
rprintf(FERROR,"write failed on %s : %s\n",
fname,strerror(errno));
- exit_cleanup(
1
);
+ exit_cleanup(
RERR_FILEIO
);
}
offset += len;
}
}
offset += len;
}
@@
-259,7
+259,7
@@
static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
rprintf(FERROR,"write failed on %s : %s\n",
fname,strerror(errno));
if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
rprintf(FERROR,"write failed on %s : %s\n",
fname,strerror(errno));
- exit_cleanup(
1
);
+ exit_cleanup(
RERR_FILEIO
);
}
sum_end(file_sum1);
}
sum_end(file_sum1);
@@
-292,7
+292,8
@@
int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
struct file_struct *file;
int phase=0;
int recv_ok;
struct file_struct *file;
int phase=0;
int recv_ok;
- extern int module_id;
+ extern struct stats stats;
+ struct stats initial_stats;
if (verbose > 2) {
rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
if (verbose > 2) {
rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
@@
-321,7
+322,7
@@
int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
if (i < 0 || i >= flist->count) {
rprintf(FERROR,"Invalid file index %d in recv_files (count=%d)\n",
i, flist->count);
if (i < 0 || i >= flist->count) {
rprintf(FERROR,"Invalid file index %d in recv_files (count=%d)\n",
i, flist->count);
- exit_cleanup(
1
);
+ exit_cleanup(
RERR_PROTOCOL
);
}
file = flist->files[i];
}
file = flist->files[i];
@@
-340,6
+341,8
@@
int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
continue;
}
continue;
}
+ initial_stats = stats;
+
if (verbose > 2)
rprintf(FINFO,"recv_files(%s)\n",fname);
if (verbose > 2)
rprintf(FINFO,"recv_files(%s)\n",fname);
@@
-419,10
+422,10
@@
int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
log_transfer(file, fname);
}
log_transfer(file, fname);
}
- log_recv(file);
-
/* recv file data */
recv_ok = receive_data(f_in,buf,fd2,fname,file->length);
/* recv file data */
recv_ok = receive_data(f_in,buf,fd2,fname,file->length);
+
+ log_recv(file, &initial_stats);
if (buf) unmap_file(buf);
if (fd1 != -1) {
if (buf) unmap_file(buf);
if (fd1 != -1) {