aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/backends.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-10 00:36:03 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-10 00:36:03 +0100
commitf4d576701c8fd2a8ea7512fa7dea70ae9f3dff2d (patch)
tree926173dfa3f4443921518d45c408f88088d5808a /src/libstat/backends/backends.h
parent9c19146f9b903aa0d1323faf58d920897ec61f72 (diff)
downloadrspamd-f4d576701c8fd2a8ea7512fa7dea70ae9f3dff2d.tar.gz
rspamd-f4d576701c8fd2a8ea7512fa7dea70ae9f3dff2d.zip
Add finalize process operation.
We could use sqlite transaction for reading as well.
Diffstat (limited to 'src/libstat/backends/backends.h')
-rw-r--r--src/libstat/backends/backends.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstat/backends/backends.h b/src/libstat/backends/backends.h
index e40bb6c9c..55d3535f7 100644
--- a/src/libstat/backends/backends.h
+++ b/src/libstat/backends/backends.h
@@ -47,6 +47,8 @@ struct rspamd_stat_backend {
struct rspamd_statfile_config *stcf, gboolean learn, gpointer ctx);
gboolean (*process_token)(struct rspamd_task *task, struct token_node_s *tok,
struct rspamd_token_result *res, gpointer ctx);
+ void (*finalize_process)(struct rspamd_task *task,
+ gpointer runtime, gpointer ctx);
gboolean (*learn_token)(struct rspamd_task *task, struct token_node_s *tok,
struct rspamd_token_result *res, gpointer ctx);
gulong (*total_learns)(struct rspamd_task *task,
@@ -71,6 +73,9 @@ struct rspamd_stat_backend {
struct token_node_s *tok, \
struct rspamd_token_result *res, \
gpointer ctx); \
+ void rspamd_##name##_finalize_process (struct rspamd_task *task, \
+ gpointer runtime, \
+ gpointer ctx); \
gboolean rspamd_##name##_learn_token (struct rspamd_task *task, \
struct token_node_s *tok, \
struct rspamd_token_result *res, \