continue calling waitpid() while still reapingchildren (patch from
[rsync/rsync.git] / log.c
diff --git a/log.c b/log.c
index 86da03a..6239409 100644 (file)
--- a/log.c
+++ b/log.c
@@ -87,8 +87,11 @@ void log_open(void)
        int len;
        FILE *f=NULL;
        extern int am_daemon;
+       extern int quiet;
        /* recursion can happen with certain fatal conditions */
 
+       if (quiet != 0 && fd == FINFO) return;
+
        va_start(ap, format);
        len = vslprintf(buf, sizeof(buf), format, ap);
        va_end(ap);
@@ -289,9 +292,9 @@ void log_recv(struct file_struct *file, struct stats *initial_stats)
        extern char *log_format;
 
        if (lp_transfer_logging(module_id)) {
-               log_formatted(FLOG, lp_log_format(module_id), "send", file, initial_stats);
+               log_formatted(FLOG, lp_log_format(module_id), "recv", file, initial_stats);
        } else if (log_format && !am_server) {
-               log_formatted(FINFO, log_format, "send", file, initial_stats);
+               log_formatted(FINFO, log_format, "recv", file, initial_stats);
        }
 }