Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When -R is used, send the permissions of the original top directories to
[rsync/rsync.git]
/
log.c
diff --git
a/log.c
b/log.c
index
6594d45
..
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;
int len;
FILE *f=NULL;
extern int am_daemon;
+ extern int quiet;
/* recursion can happen with certain fatal conditions */
/* 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);
va_start(ap, format);
len = vslprintf(buf, sizeof(buf), format, ap);
va_end(ap);
@@
-186,6
+189,7
@@
static void log_formatted(int fd,
int l;
extern struct stats stats;
extern int am_sender;
int l;
extern struct stats stats;
extern int am_sender;
+ extern int am_daemon;
int64 b;
strlcpy(buf, format, sizeof(buf));
int64 b;
strlcpy(buf, format, sizeof(buf));
@@
-196,8
+200,8
@@
static void log_formatted(int fd,
s = p + 1;
switch (p[1]) {
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);
case 'l':
slprintf(buf2,sizeof(buf2),"%.0f",
(double)file->length);
@@
-288,14
+292,14
@@
void log_recv(struct file_struct *file, struct stats *initial_stats)
extern char *log_format;
if (lp_transfer_logging(module_id)) {
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) {
} else if (log_format && !am_server) {
- log_formatted(FINFO, log_format, "
send
", file, initial_stats);
+ log_formatted(FINFO, log_format, "
recv
", file, initial_stats);
}
}
/* called when the transfer is interrupted for some reason */
}
}
/* called when the transfer is interrupted for some reason */
-void log_exit(int code)
+void log_exit(int code
, const char *file, int line
)
{
if (code == 0) {
extern struct stats stats;
{
if (code == 0) {
extern struct stats stats;
@@
-304,7
+308,8
@@
void log_exit(int code)
(double)stats.total_read,
(double)stats.total_size);
} else {
(double)stats.total_read,
(double)stats.total_size);
} else {
- rprintf(FLOG,"transfer interrupted (code %d)\n", code);
+ rprintf(FLOG,"transfer interrupted (code %d) at %s(%d)\n",
+ code, file, line);
}
}
}
}
@@
-313,7
+318,7
@@
void log_exit(int code)
it i called when a file starts to be transferred
*/
it i called when a file starts to be transferred
*/
-void log_transfer(struct file_struct *file, char *fname)
+void log_transfer(struct file_struct *file, c
onst c
har *fname)
{
extern int verbose;
{
extern int verbose;