summaryrefslogtreecommitdiffstats
path: root/src/libstat/backends
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-23 16:26:55 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-23 16:26:55 +0000
commit82612bf153debaff5a11e5542caca454e921eeaf (patch)
treeda3a5c9e7fcb90855543af1d36b0d437c88a960e /src/libstat/backends
parent2b1f046085b35e685fad03a88c827eee1f483093 (diff)
downloadrspamd-82612bf153debaff5a11e5542caca454e921eeaf.tar.gz
rspamd-82612bf153debaff5a11e5542caca454e921eeaf.zip
Refactor structures names.
Diffstat (limited to 'src/libstat/backends')
-rw-r--r--src/libstat/backends/backends.h5
-rw-r--r--src/libstat/backends/mmaped_file.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/libstat/backends/backends.h b/src/libstat/backends/backends.h
index 37a7560cd..45a8cd314 100644
--- a/src/libstat/backends/backends.h
+++ b/src/libstat/backends/backends.h
@@ -33,13 +33,14 @@
struct rspamd_classifier_config;
struct rspamd_statfile_config;
struct rspamd_config;
+struct rspamd_stat_ctx;
struct rspamd_stat_backend {
const char *name;
- gpointer (*init)(struct rspamd_statfile_config *cfg);
+ gpointer (*init)(struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg);
gpointer ctx;
};
-gpointer rspamd_mmaped_file_init(struct rspamd_config *cfg);
+gpointer rspamd_mmaped_file_init(struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg);
#endif /* BACKENDS_H_ */
diff --git a/src/libstat/backends/mmaped_file.c b/src/libstat/backends/mmaped_file.c
index cef17f465..49f4d5ba4 100644
--- a/src/libstat/backends/mmaped_file.c
+++ b/src/libstat/backends/mmaped_file.c
@@ -801,7 +801,7 @@ rspamd_mmaped_file_get_total (rspamd_mmaped_file_t *file)
}
gpointer
-rspamd_mmaped_file_init (struct rspamd_config *cfg)
+rspamd_mmaped_file_init (struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg)
{
rspamd_mmaped_file_ctx *new;
struct rspamd_classifier_config *clf;
@@ -852,6 +852,8 @@ rspamd_mmaped_file_init (struct rspamd_config *cfg)
size = ucl_object_toint (sizeo);
rspamd_mmaped_file_open (new, filename, size);
+
+ ctx->statfiles ++;
}
curst = curst->next;