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
Added a command-line override for daemon config parameters:
[rsync/rsync.git]
/
log.c
diff --git
a/log.c
b/log.c
index
5d59419
..
13c9311
100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-53,12
+53,12
@@
extern char *logfile_name;
extern iconv_t ic_chck;
#endif
#ifdef ICONV_OPTION
extern iconv_t ic_chck;
#endif
#ifdef ICONV_OPTION
-extern iconv_t ic_
send, ic_
recv;
+extern iconv_t ic_recv;
#endif
#endif
-extern char curr_dir[];
+extern char curr_dir[
MAXPATHLEN
];
extern char *module_dir;
extern unsigned int module_dirlen;
extern char *module_dir;
extern unsigned int module_dirlen;
-extern char sender_file_sum[];
+extern char sender_file_sum[
MAX_DIGEST_LEN
];
static int log_initialised;
static int logfile_was_closed;
static int log_initialised;
static int logfile_was_closed;
@@
-258,10
+258,8
@@
void rwrite(enum logcode code, const char *buf, int len, int is_utf8)
if (len < 0)
exit_cleanup(RERR_MESSAGEIO);
if (len < 0)
exit_cleanup(RERR_MESSAGEIO);
- if (msgs2stderr && code != FLOG) {
- f = stderr;
+ if (msgs2stderr > 0 && code != FLOG)
goto output_msg;
goto output_msg;
- }
if (am_server && msg_fd_out >= 0) {
assert(!is_utf8);
if (am_server && msg_fd_out >= 0) {
assert(!is_utf8);
@@
-312,8
+310,10
@@
void rwrite(enum logcode code, const char *buf, int len, int is_utf8)
/* TODO: can we send the error to the user somehow? */
return;
}
/* TODO: can we send the error to the user somehow? */
return;
}
+ msgs2stderr = -1;
}
}
+output_msg:
switch (code) {
case FERROR_XFER:
got_xfer_error = 1;
switch (code) {
case FERROR_XFER:
got_xfer_error = 1;
@@
-323,13
+323,13
@@
void rwrite(enum logcode code, const char *buf, int len, int is_utf8)
f = stderr;
break;
case FINFO:
f = stderr;
break;
case FINFO:
- f = am_server ? stderr : stdout;
+ case FCLIENT:
+ f = msgs2stderr ? stderr : stdout;
break;
default:
exit_cleanup(RERR_MESSAGEIO);
}
break;
default:
exit_cleanup(RERR_MESSAGEIO);
}
-output_msg:
if (output_needs_newline) {
fputc('\n', f);
output_needs_newline = 0;
if (output_needs_newline) {
fputc('\n', f);
output_needs_newline = 0;
@@
-351,7
+351,7
@@
output_msg:
int ierrno;
INIT_CONST_XBUF(outbuf, convbuf);
int ierrno;
INIT_CONST_XBUF(outbuf, convbuf);
- INIT_XBUF(inbuf, (char*)buf, len, -1);
+ INIT_XBUF(inbuf, (char*)buf, len,
(size_t)
-1);
while (inbuf.len) {
iconvbufs(ic, &inbuf, &outbuf, 0);
while (inbuf.len) {
iconvbufs(ic, &inbuf, &outbuf, 0);