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
Cast file->mode to an int when printing it via %o.
[rsync/rsync.git]
/
log.c
diff --git
a/log.c
b/log.c
index
493ee1a
..
7fd37e4
100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-154,17
+154,14
@@
static void logfile_open(void)
void log_init(void)
{
void log_init(void)
{
- time_t t;
-
if (log_initialised)
return;
log_initialised = 1;
if (log_initialised)
return;
log_initialised = 1;
- /*
t
his looks pointless, but it is needed in order for the
+ /*
T
his looks pointless, but it is needed in order for the
* C library on some systems to fetch the timezone info
* C library on some systems to fetch the timezone info
- * before the chroot */
- t = time(NULL);
- localtime(&t);
+ * before the chroot. */
+ timestring(time(NULL));
/* optionally use a log file instead of syslog */
logfname = lp_log_file();
/* optionally use a log file instead of syslog */
logfname = lp_log_file();
@@
-259,7
+256,7
@@
void rwrite(enum logcode code, char *buf, int len)
if (am_server) {
/* Pass the message to the non-server side. */
if (am_server) {
/* Pass the message to the non-server side. */
- if (
io_multiplex_write
((enum msgcode)code, buf, len))
+ if (
send_msg
((enum msgcode)code, buf, len))
return;
if (am_daemon) {
/* TODO: can we send the error to the user somehow? */
return;
if (am_daemon) {
/* TODO: can we send the error to the user somehow? */