Commit 65c56212 65c562120e5066dac3a43de7df4e213e6a21cfec by Sergey Poznyakoff

Use mu_syslog_error_printer.

1 parent 2da193c4
......@@ -45,7 +45,6 @@ static struct option long_options[] =
const char *short_options ="d::hip:t:vO:P:S:";
static int syslog_error_printer __P ((const char *fmt, va_list ap));
static int imap4d_mainloop __P ((int, int));
static void imap4d_daemon_init __P ((void));
static void imap4d_daemon __P ((unsigned int, unsigned int));
......@@ -171,7 +170,7 @@ main (int argc, char **argv)
/* Redirect any stdout error from the library to syslog, they
should not go to the client. */
mu_error_set_print (syslog_error_printer);
mu_error_set_print (mu_syslog_error_printer);
umask (S_IROTH | S_IWOTH | S_IXOTH); /* 007 */
......@@ -388,9 +387,4 @@ imap4d_usage (char *argv0)
exit (0);
}
static int
syslog_error_printer (const char *fmt, va_list ap)
{
vsyslog (LOG_CRIT, fmt, ap);
return 0;
}
......
......@@ -44,7 +44,6 @@ static struct option long_options[] =
const char *short_options = "d::hip:t:v";
static int syslog_error_printer __P ((const char *fmt, va_list ap));
static int pop3d_mainloop __P ((int, int));
static void pop3d_daemon_init __P ((void));
static void pop3d_daemon __P ((unsigned int, unsigned int));
......@@ -160,7 +159,7 @@ main (int argc, char **argv)
openlog ("gnu-pop3d", LOG_PID, LOG_FACILITY);
/* Redirect any stdout error from the library to syslog, they
should not go to the client. */
mu_error_set_print (syslog_error_printer);
mu_error_set_print (mu_syslog_error_printer);
umask (S_IROTH | S_IWOTH | S_IXOTH); /* 007 */
......@@ -486,9 +485,4 @@ pop3d_usage (char *argv0)
exit (EXIT_SUCCESS);
}
static int
syslog_error_printer (const char *fmt, va_list ap)
{
vsyslog (LOG_CRIT, fmt, ap);
return 0;
}
......