aboutsummaryrefslogtreecommitdiffstats
path: root/src/statfile.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-09-28 19:11:05 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-09-28 19:11:05 +0400
commitee3d2182e1ce2a65822ac5a7dc51201a7c8b327d (patch)
treef8d9de66f3d7bb77ce7e571bf210a40a91d67ea3 /src/statfile.h
parente1fea1e66d0f1111e934bb0e86bd2ce25da6df6e (diff)
downloadrspamd-ee3d2182e1ce2a65822ac5a7dc51201a7c8b327d.tar.gz
rspamd-ee3d2182e1ce2a65822ac5a7dc51201a7c8b327d.zip
* Fix race between learn and classify
Diffstat (limited to 'src/statfile.h')
-rw-r--r--src/statfile.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/statfile.h b/src/statfile.h
index be5d15b71..de2ced1b0 100644
--- a/src/statfile.h
+++ b/src/statfile.h
@@ -32,7 +32,7 @@ struct stat_file_header {
* Section header
*/
struct stat_file_section {
- uint32_t code; /**< section's code */
+ uint64_t code; /**< section's code */
uint64_t length; /**< section's length in blocks */
};
@@ -42,8 +42,8 @@ struct stat_file_section {
struct stat_file_block {
uint32_t hash1; /**< hash1 (also acts as index) */
uint32_t hash2; /**< hash2 */
- float value; /**< float value */
uint32_t last_access; /**< last access to block since create time of file */
+ float value; /**< float value */
};
/**
@@ -59,7 +59,11 @@ struct stat_file {
* Common view of statfile object
*/
typedef struct stat_file_s {
- char *filename; /**< name of file */
+#ifdef HAVE_PATH_MAX
+ char filename[PATH_MAX]; /**< name of file */
+#else
+ char filename[MAXPATHLEN]; /**< name of file */
+#endif
int fd; /**< descriptor */
void *map; /**< mmaped area */
off_t seek_pos; /**< current seek position */