aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/backends.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-19 15:25:10 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-19 15:25:10 +0100
commit45c538da92ef6482a6e276be8064321c0636aff4 (patch)
tree34f0fb94e604da018dd8fcfb68d119e91c59a881 /src/libstat/backends/backends.h
parent37117c9d9884e2293373aea028e33eaaedf4b6a5 (diff)
downloadrspamd-45c538da92ef6482a6e276be8064321c0636aff4.tar.gz
rspamd-45c538da92ef6482a6e276be8064321c0636aff4.zip
Implement statistics closing.
Diffstat (limited to 'src/libstat/backends/backends.h')
-rw-r--r--src/libstat/backends/backends.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstat/backends/backends.h b/src/libstat/backends/backends.h
index 8180e1baf..18f4fce26 100644
--- a/src/libstat/backends/backends.h
+++ b/src/libstat/backends/backends.h
@@ -54,6 +54,7 @@ struct rspamd_stat_backend {
gulong (*inc_learns)(struct rspamd_statfile_runtime *runtime, gpointer ctx);
gulong (*dec_learns)(struct rspamd_statfile_runtime *runtime, gpointer ctx);
ucl_object_t* (*get_stat)(struct rspamd_statfile_runtime *runtime, gpointer ctx);
+ void (*close)(gpointer ctx);
gpointer ctx;
};
@@ -79,7 +80,8 @@ struct rspamd_stat_backend {
gulong rspamd_##name##_learns (struct rspamd_statfile_runtime *runtime, \
gpointer ctx); \
ucl_object_t * rspamd_##name##_get_stat (struct rspamd_statfile_runtime *runtime, \
- gpointer ctx)
+ gpointer ctx); \
+ void rspamd_##name##_close (gpointer ctx)
RSPAMD_STAT_BACKEND_DEF(mmaped_file);
RSPAMD_STAT_BACKEND_DEF(redis);