aboutsummaryrefslogtreecommitdiffstats
path: root/src/statfile.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-19 17:01:08 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-19 17:01:08 +0300
commit87c9659fdd08bbbc0eb796afccf7237a03181498 (patch)
tree9d18d2064ac00b566c48eda1c1b58a31f8c7dd72 /src/statfile.c
parentfe5ad5874aad220fb12a259e607f89ce5fae7465 (diff)
downloadrspamd-87c9659fdd08bbbc0eb796afccf7237a03181498.tar.gz
rspamd-87c9659fdd08bbbc0eb796afccf7237a03181498.zip
* Rewrite perl client for rspamd, now it allows access to both normal and control interfaces
* Fix small errors in tokenizer and controller interface
Diffstat (limited to 'src/statfile.c')
-rw-r--r--src/statfile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/statfile.c b/src/statfile.c
index c0a2a2487..830bc5960 100644
--- a/src/statfile.c
+++ b/src/statfile.c
@@ -337,6 +337,12 @@ statfile_pool_set_block (statfile_pool_t *pool, char *filename, uint32_t h1, uin
msg_debug ("statfile_pool_set_block: chain %u is full, starting expire", blocknum);
break;
}
+ /* First try to find block in chain */
+ if (block->hash1 == h1 && block->hash2 == h2) {
+ block->last_access = now - (time_t)header->create_time;
+ block->value = value;
+ return;
+ }
/* Check whether we have a free block in chain */
if (block->hash1 == 0 && block->hash2 == 0) {
/* Write new block here */