Only call show_progress() and end_progress() if do_progress is set.

This commit is contained in:
Wayne Davison committed 2003-07-08 16:49:10 +00:00
1 parent b49d381d05
commit 16417f8b9d
2 files changed
+7 -4

No files matched your search

+2 -1
View File
@@ -21,6 +21,7 @@
extern int verbose;
extern int am_server;
extern int do_progress;
typedef unsigned short tag;
@@ -127,7 +128,7 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
else
last_match = offset;
if (buf) {
if (buf && do_progress) {
show_progress(last_match, buf->file_size);
if (i == -1) end_progress(buf->file_size);
+5 -3
View File
@@ -35,6 +35,7 @@ extern int io_error;
extern char *tmpdir;
extern char *compare_dest;
extern int make_backups;
extern int do_progress;
extern char *backup_suffix;
static struct delete_list {
@@ -244,8 +245,8 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
sum_init();
for (i=recv_token(f_in,&data); i != 0; i=recv_token(f_in,&data)) {
show_progress(offset, total_size);
if (do_progress)
show_progress(offset, total_size);
if (i > 0) {
extern int cleanup_got_literal;
@@ -295,7 +296,8 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
offset += len;
}
end_progress(total_size);
if (do_progress)
end_progress(total_size);
if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
rprintf(FERROR,"write failed on %s : %s\n",