diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-11-09 21:05:38 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-11-09 21:05:38 +0300 |
commit | 161f4d012cb00bf40853a0bb59f22d1373dbff53 (patch) | |
tree | 49e5f5941760d871fc5229b235ac9dae2dce2034 /src/controller.c | |
parent | 19857603612f664b37ac627aab2325a5497131ee (diff) | |
download | rspamd-161f4d012cb00bf40853a0bb59f22d1373dbff53.tar.gz rspamd-161f4d012cb00bf40853a0bb59f22d1373dbff53.zip |
* Avoid mmap'ing in binlog as mmapped areas must be aligned
* Make binlog working for writing
* Add config params for binlog
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/controller.c b/src/controller.c index d59690da2..3b0179734 100644 --- a/src/controller.c +++ b/src/controller.c @@ -32,6 +32,7 @@ #include "modules.h" #include "tokenizers/tokenizers.h" #include "classifiers/classifiers.h" +#include "binlog.h" #define CRLF "\r\n" #define END "END" CRLF @@ -477,7 +478,8 @@ controller_read_socket (f_str_t * in, void *arg) session->learn_classifier->classifier->learn_func (cls_ctx, session->worker->srv->statfile_pool, session->learn_symbol, tokens, session->in_class); session->worker->srv->stat->messages_learned++; - + maybe_write_binlog (session->learn_classifier, session->learn_symbol, tokens); + free_task (task, FALSE); i = snprintf (out_buf, sizeof (out_buf), "learn ok" CRLF); if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) { |