Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c51d5d
)
move the time init before the logfile opening.
author
Andrew Tridgell
<tridge@samba.org>
Fri, 30 Oct 1998 11:18:38 +0000
(11:18 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Fri, 30 Oct 1998 11:18:38 +0000
(11:18 +0000)
log.c
patch
|
blob
|
blame
|
history
diff --git
a/log.c
b/log.c
index
d09094c
..
30aca47
100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-69,6
+69,13
@@
void log_open(void)
if (initialised) return;
initialised = 1;
if (initialised) return;
initialised = 1;
+ /* this looks pointless, but it is needed in order for the
+ C library on some systems to fetch the timezone info
+ before the chroot */
+ t = time(NULL);
+ localtime(&t);
+
+ /* optionally use a log file instead of syslog */
logf = lp_log_file();
if (logf && *logf) {
logfile = fopen(logf, "a");
logf = lp_log_file();
if (logf && *logf) {
logfile = fopen(logf, "a");
@@
-88,12
+95,6
@@
void log_open(void)
#ifndef LOG_NDELAY
logit(LOG_INFO,"rsyncd started\n");
#endif
#ifndef LOG_NDELAY
logit(LOG_INFO,"rsyncd started\n");
#endif
-
- /* this looks pointless, but it is needed in order for the
- C library on some systems to fetch the timezone info
- before the chroot */
- t = time(NULL);
- localtime(&t);
}
}