aboutsummaryrefslogtreecommitdiffstats
path: root/src/smtp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-05-10 19:15:03 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-05-10 19:15:03 +0400
commit1fd435e5d4fc3c51fae8a1a184b347bdf6039d26 (patch)
treef17ee669ea0d5bfa497b3c952e8d7bed9885501a /src/smtp.c
parent683b90f4c6c744557f7429ce6ff77c0f7d2175e1 (diff)
downloadrspamd-1fd435e5d4fc3c51fae8a1a184b347bdf6039d26.tar.gz
rspamd-1fd435e5d4fc3c51fae8a1a184b347bdf6039d26.zip
* Rework build process:
- add librspamdserver - link this library to all daemons and utils of rspamd - use subdirectories more often * Rework global variables logic - move them to the main process * Fix logging to handle utf-8 correctly * Add statshow utility and make it working * Move printf functions to separate source file
Diffstat (limited to 'src/smtp.c')
-rw-r--r--src/smtp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/smtp.c b/src/smtp.c
index 390e73117..c2fa22980 100644
--- a/src/smtp.c
+++ b/src/smtp.c
@@ -65,7 +65,7 @@ sig_handler (gint signo, siginfo_t *info, void *unused)
switch (signo) {
case SIGUSR1:
- reopen_log ();
+ reopen_log (rspamd_main->logger);
break;
case SIGINT:
case SIGTERM:
@@ -97,7 +97,6 @@ sigusr_handler (gint fd, short what, void *arg)
tv.tv_usec = 0;
event_del (&worker->sig_ev);
event_del (&worker->bind_ev);
- do_reopen_log = 1;
msg_info ("worker's shutdown is pending in %d sec", SOFT_SHUTDOWN_TIME);
event_loopexit (&tv);
}
@@ -572,7 +571,7 @@ smtp_dns_cb (struct rspamd_dns_reply *reply, void *arg)
case SMTP_STATE_RESOLVE_REVERSE:
/* Parse reverse reply and start resolve of this ip */
if (reply->code != DNS_RC_NOERROR) {
- rspamd_conditional_debug(session->client_addr.s_addr, __FUNCTION__,
+ rspamd_conditional_debug(rspamd_main->logger, session->client_addr.s_addr, __FUNCTION__,
"DNS error: %s", dns_strerror (reply->code));
if (reply->code == DNS_RC_NXDOMAIN) {
@@ -596,7 +595,7 @@ smtp_dns_cb (struct rspamd_dns_reply *reply, void *arg)
break;
case SMTP_STATE_RESOLVE_NORMAL:
if (reply->code != DNS_RC_NOERROR) {
- rspamd_conditional_debug(session->client_addr.s_addr, __FUNCTION__,
+ rspamd_conditional_debug(rspamd_main->logger, session->client_addr.s_addr, __FUNCTION__,
"DNS error: %s", dns_strerror (reply->code));
if (reply->code == DNS_RC_NXDOMAIN) {
@@ -1008,7 +1007,7 @@ start_smtp_worker (struct rspamd_worker *worker)
event_loop (0);
- close_log ();
+ close_log (rspamd_main->logger);
exit (EXIT_SUCCESS);
}