aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/classifiers
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-15 16:37:58 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commit98897c179754fb04762d325c83f1e057b44697a3 (patch)
treed53ea0de2cf2fb2e50cefe5496aa80963f8621f5 /src/libstat/classifiers
parent36ab21685bbf354108a7f12e1dda36761f655e68 (diff)
downloadrspamd-98897c179754fb04762d325c83f1e057b44697a3.tar.gz
rspamd-98897c179754fb04762d325c83f1e057b44697a3.zip
[Project] First refactoring step libevent->libev
Diffstat (limited to 'src/libstat/classifiers')
-rw-r--r--src/libstat/classifiers/bayes.c2
-rw-r--r--src/libstat/classifiers/classifiers.h8
-rw-r--r--src/libstat/classifiers/lua_classifier.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/libstat/classifiers/bayes.c b/src/libstat/classifiers/bayes.c
index 2b0cf21e8..eca94156c 100644
--- a/src/libstat/classifiers/bayes.c
+++ b/src/libstat/classifiers/bayes.c
@@ -256,7 +256,7 @@ bayes_classify_token (struct rspamd_classifier *ctx,
gboolean
bayes_init (struct rspamd_config *cfg,
- struct event_base *ev_base,
+ struct ev_loop *ev_base,
struct rspamd_classifier *cl)
{
cl->cfg->flags |= RSPAMD_FLAG_CLASSIFIER_INTEGER;
diff --git a/src/libstat/classifiers/classifiers.h b/src/libstat/classifiers/classifiers.h
index fd6daf433..738a5e8c9 100644
--- a/src/libstat/classifiers/classifiers.h
+++ b/src/libstat/classifiers/classifiers.h
@@ -3,7 +3,7 @@
#include "config.h"
#include "mem_pool.h"
-#include <event.h>
+#include "contrib/libev/ev.h"
#define RSPAMD_DEFAULT_CLASSIFIER "bayes"
/* Consider this value as 0 */
@@ -19,7 +19,7 @@ struct token_node_s;
struct rspamd_stat_classifier {
char *name;
gboolean (*init_func)(struct rspamd_config *cfg,
- struct event_base *ev_base,
+ struct ev_loop *ev_base,
struct rspamd_classifier *cl);
gboolean (*classify_func)(struct rspamd_classifier * ctx,
GPtrArray *tokens,
@@ -35,7 +35,7 @@ struct rspamd_stat_classifier {
/* Bayes algorithm */
gboolean bayes_init (struct rspamd_config *cfg,
- struct event_base *ev_base,
+ struct ev_loop *ev_base,
struct rspamd_classifier *);
gboolean bayes_classify (struct rspamd_classifier *ctx,
GPtrArray *tokens,
@@ -50,7 +50,7 @@ void bayes_fin (struct rspamd_classifier *);
/* Generic lua classifier */
gboolean lua_classifier_init (struct rspamd_config *cfg,
- struct event_base *ev_base,
+ struct ev_loop *ev_base,
struct rspamd_classifier *);
gboolean lua_classifier_classify (struct rspamd_classifier *ctx,
GPtrArray *tokens,
diff --git a/src/libstat/classifiers/lua_classifier.c b/src/libstat/classifiers/lua_classifier.c
index 83ce7b0e1..21ecba7a1 100644
--- a/src/libstat/classifiers/lua_classifier.c
+++ b/src/libstat/classifiers/lua_classifier.c
@@ -48,7 +48,7 @@ INIT_LOG_MODULE(luacl)
gboolean
lua_classifier_init (struct rspamd_config *cfg,
- struct event_base *ev_base,
+ struct ev_loop *ev_base,
struct rspamd_classifier *cl)
{
struct rspamd_lua_classifier_ctx *ctx;