removed log_transfer() It was no more than a conditional
authorJ.W. Schultz <jw@samba.org>
Tue, 25 Mar 2003 02:28:54 +0000 (02:28 +0000)
committerJ.W. Schultz <jw@samba.org>
Tue, 25 Mar 2003 02:28:54 +0000 (02:28 +0000)
rprintf() with an unused param.

log.c
receiver.c
sender.c

diff --git a/log.c b/log.c
index 3ffd3e2..34ff6d3 100644 (file)
--- a/log.c
+++ b/log.c
@@ -572,17 +572,3 @@ void log_exit(int code, const char *file, int line)
                        name, code, file, line);
        }
 }
-
-/*
- * Log the incoming transfer of a file for interactive use,
- * this will be called at the end where the client was run.
- * Called when a file starts to be transferred.
- */
-void log_transfer(struct file_struct *file, const char *fname)
-{
-       extern int verbose;
-
-       if (!verbose) return;
-
-       rprintf(FINFO, "%s\n", fname);
-}
index 3eea783..d50e67a 100644 (file)
@@ -357,8 +357,8 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
                        fname = local_name;
 
                if (dry_run) {
-                       if (!am_server) {
-                               log_transfer(file, fname);
+                       if (!am_server && verbose) {    /* log transfer */
+                               rprintf(FINFO, "%s\n", fname);
                        }
                        continue;
                }
@@ -444,8 +444,8 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
       
                cleanup_set(fnametmp, fname, file, buf, fd1, fd2);
 
-               if (!am_server) {
-                       log_transfer(file, fname);
+               if (!am_server && verbose) {    /* log transfer */
+                       rprintf(FINFO, "%s\n", fname);
                }
 
                /* recv file data */
index 212ceba..a42042b 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -158,8 +158,8 @@ void send_files(struct file_list *flist,int f_out,int f_in)
                        rprintf(FINFO,"send_files(%d,%s)\n",i,fname);
          
                if (dry_run) {  
-                       if (!am_server) {
-                               log_transfer(file, fname+offset);
+                       if (!am_server && verbose) {    /* log transfer */
+                               rprintf(FINFO, "%s\n", fname+offset);
                        }
                        write_int(f_out,i);
                        continue;
@@ -220,8 +220,8 @@ void send_files(struct file_list *flist,int f_out,int f_in)
                        if (!read_batch)
                            rprintf(FINFO,"calling match_sums %s\n",fname);
          
-               if (!am_server) {
-                       log_transfer(file, fname+offset);
+               if (!am_server && verbose) {    /* log transfer */
+                       rprintf(FINFO, "%s\n", fname+offset);
                }
 
                set_compression(fname);