From: Vsevolod Stakhov Date: Tue, 24 Sep 2013 13:51:15 +0000 (+0100) Subject: Preserve statfiles versions on resize. X-Git-Tag: 0.6.0~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed0730ba126c074c8da3c897c9e02d82d371548e;p=thirdparty%2Frspamd.git Preserve statfiles versions on resize. --- diff --git a/src/statfile.c b/src/statfile.c index e5672f8fad..ce7c474cce 100644 --- a/src/statfile.c +++ b/src/statfile.c @@ -227,6 +227,7 @@ statfile_pool_reindex (statfile_pool_t * pool, gchar *filename, size_t old_size, stat_file_t *new; u_char *map, *pos; struct stat_file_block *block; + struct stat_file_header *header; /* First of all rename old file */ memory_pool_lock_mutex (pool->lock); @@ -273,6 +274,9 @@ statfile_pool_reindex (statfile_pool_t * pool, gchar *filename, size_t old_size, } pos += sizeof (block); } + + header = (struct stat_file_header *)map; + statfile_set_revision (new, header->revision, header->rev_time); munmap (map, old_size); close (fd);