When logging PERMS_REPORT messages, send them with the FCLIENT code
authorWayne Davison <wayned@samba.org>
Sat, 19 Feb 2005 22:16:53 +0000 (22:16 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 19 Feb 2005 22:16:53 +0000 (22:16 +0000)
if the daemon has "%i" in its log message (because it already got a
detailed log message from the generator).

rsync.c

diff --git a/rsync.c b/rsync.c
index 4c34deb4963b7fceb245c9a2e4a26b88157745d9..4bf8b8ab06aa82a68c4eb41819ff9d3491a5be46 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -24,7 +24,7 @@
 
 extern int verbose;
 extern int dry_run;
-extern int itemize_changes;
+extern int daemon_log_format_has_i;
 extern int preserve_times;
 extern int omit_dir_times;
 extern int am_root;
@@ -231,10 +231,12 @@ int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st,
 #endif
 
        if (verbose > 1 && flags & PERMS_REPORT) {
+               enum logcode code = daemon_log_format_has_i || dry_run
+                                 ? FCLIENT : FINFO;
                if (updated)
-                       rprintf(FINFO, "%s\n", safe_fname(fname));
+                       rprintf(code, "%s\n", safe_fname(fname));
                else
-                       rprintf(FINFO, "%s is uptodate\n", safe_fname(fname));
+                       rprintf(code, "%s is uptodate\n", safe_fname(fname));
        }
        return updated;
 }