X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a9766ef1472d04df22178f69ea7bfde36f2b7242..117af10225d7efd286ffd77ff550644985ce0918:/log.c diff --git a/log.c b/log.c index 82a88cd5..3643df7e 100644 --- a/log.c +++ b/log.c @@ -186,6 +186,7 @@ static void log_formatted(int fd, int l; extern struct stats stats; extern int am_sender; + extern int am_daemon; int64 b; strlcpy(buf, format, sizeof(buf)); @@ -196,8 +197,8 @@ static void log_formatted(int fd, s = p + 1; switch (p[1]) { - case 'h': n = client_name(0); break; - case 'a': n = client_addr(0); break; + case 'h': if (am_daemon) n = client_name(0); break; + case 'a': if (am_daemon) n = client_addr(0); break; case 'l': slprintf(buf2,sizeof(buf2),"%.0f", (double)file->length); @@ -288,9 +289,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); } }