void log_init(void)
{
- time_t t;
-
if (log_initialised)
return;
log_initialised = 1;
- /* this looks pointless, but it is needed in order for the
+ /* 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);
+ * before the chroot. */
+ timestring(time(NULL));
/* optionally use a log file instead of syslog */
logfname = lp_log_file();
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? */