diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-28 15:01:32 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-28 15:01:32 +0000 |
commit | 7fd5a65a11d756618ddc51a22f005efdc108ba45 (patch) | |
tree | fc36369f37085220796d151aec5df94452f826d3 /src/libstat/backends/mmaped_file.c | |
parent | 7ab573abf4036d2b1327099ac7c6634a80e455d7 (diff) | |
download | rspamd-7fd5a65a11d756618ddc51a22f005efdc108ba45.tar.gz rspamd-7fd5a65a11d756618ddc51a22f005efdc108ba45.zip |
Increase revision after learning.
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; +} |