Allow the --log-file-format=FMT option (if given when starting a daemon)
authorWayne Davison <wayned@samba.org>
Tue, 30 May 2006 17:15:24 +0000 (17:15 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 30 May 2006 17:15:24 +0000 (17:15 +0000)
to override the "log format" setting.

clientserver.c

index 8c42631..478e6cb 100644 (file)
@@ -324,14 +324,12 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
        if (lp_read_only(i))
                read_only = 1;
 
-       if (lp_transfer_logging(i)) {
+       if (lp_transfer_logging(i) && !logfile_format)
                logfile_format = lp_log_format(i);
-               if (log_format_has(logfile_format, 'i'))
-                       logfile_format_has_i = 1;
-               if (logfile_format_has_i
-                   || log_format_has(logfile_format, 'o'))
-                       logfile_format_has_o_or_i = 1;
-       }
+       if (log_format_has(logfile_format, 'i'))
+               logfile_format_has_i = 1;
+       if (logfile_format_has_i || log_format_has(logfile_format, 'o'))
+               logfile_format_has_o_or_i = 1;
 
        am_root = (MY_UID() == 0);