diff options
Diffstat (limited to 'src/libstat/backends/mmaped_file.c')
-rw-r--r-- | src/libstat/backends/mmaped_file.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libstat/backends/mmaped_file.c b/src/libstat/backends/mmaped_file.c index 8965353a1..e85db248b 100644 --- a/src/libstat/backends/mmaped_file.c +++ b/src/libstat/backends/mmaped_file.c @@ -956,3 +956,19 @@ rspamd_mmaped_file_total_learns (struct rspamd_statfile_runtime *runtime, return rev; } + +gulong +rspamd_mmaped_file_inc_learns (struct rspamd_statfile_runtime *runtime, + gpointer ctx) +{ + rspamd_mmaped_file_t *mf = (rspamd_mmaped_file_t *)runtime; + guint64 rev = 0; + time_t t; + + if (mf != NULL) { + rspamd_mmaped_file_inc_revision (mf); + rspamd_mmaped_file_get_revision (mf, &rev, &t); + } + + return rev; +} |