summaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-31 17:19:29 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-31 17:19:29 +0000
commit60383ec549918fe5f0a1bbdda09fd74abac56e09 (patch)
treee21d2da77f9c8f836e641fd3e3fca8077ae2334e /src/rspamd_proxy.c
parenta7d2ffaef760aa8d61b34a2426e7215e781ff7d4 (diff)
downloadrspamd-60383ec549918fe5f0a1bbdda09fd74abac56e09.tar.gz
rspamd-60383ec549918fe5f0a1bbdda09fd74abac56e09.zip
[Project] Enable language detector init in scanner workers
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index 75002fef8..cf6112b75 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -34,6 +34,7 @@
#include "ottery.h"
#include "unix-std.h"
#include "libserver/milter.h"
+#include "libmime/lang_detection.h"
#include "contrib/zstd/zstd.h"
#ifdef HAVE_NETINET_TCP_H
@@ -145,6 +146,8 @@ struct rspamd_proxy_ctx {
gchar *spam_header;
/* Sessions cache */
void *sessions_cache;
+ /* Language detector */
+ struct rspamd_lang_detector *lang_det;
};
enum rspamd_backend_flags {
@@ -2139,7 +2142,8 @@ start_rspamd_proxy (struct rspamd_worker *worker) {
if (ctx->has_self_scan) {
/* Additional initialisation needed */
- rspamd_worker_init_scanner (worker, ctx->ev_base, ctx->resolver);
+ rspamd_worker_init_scanner (worker, ctx->ev_base, ctx->resolver,
+ &ctx->lang_det);
}
if (worker->srv->cfg->enable_sessions_cache) {