aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-12-05 00:11:40 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-12-05 00:11:40 +0000
commit67e996596247fc44b686599d46b8555420c180eb (patch)
treed8fd51a90b63ceed4e8a3f3acb5ba560b3ef41d5
parent86e730e54fbb3348b60bf8d8279ba1100e46f66c (diff)
downloadrspamd-67e996596247fc44b686599d46b8555420c180eb.tar.gz
rspamd-67e996596247fc44b686599d46b8555420c180eb.zip
Do not resize statfile if old_size == new_size.
-rw-r--r--src/statfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/statfile.c b/src/statfile.c
index b5d467426..9cc2d58f3 100644
--- a/src/statfile.c
+++ b/src/statfile.c
@@ -307,7 +307,7 @@ statfile_pool_open (statfile_pool_t * pool, gchar *filename, size_t size, gboole
}
memory_pool_lock_mutex (pool->lock);
- if (!forced && size > sizeof (struct stat_file)) {
+ if (!forced && size != (size_t)st.st_size && size > sizeof (struct stat_file)) {
memory_pool_unlock_mutex (pool->lock);
msg_warn ("need to reindex statfile old size: %Hz, new size: %Hz", st.st_size, size);
return statfile_pool_reindex (pool, filename, st.st_size, size);