diff src/lib-index/mail-transaction-log.h @ 3169:ec17099a6490 HEAD

Added versioning to transaction log header. Added create_stamp to its header and it's not used to determine if the transaction log should be rotated, not the last time the log was updated. So now if the log is over 128kB, it's rotated as soon as it's at least 5 minutes old.
author Timo Sirainen <tss@iki.fi>
date Sat, 05 Mar 2005 12:19:37 +0200
parents fbe844061fe2
children d137899ea853
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log.h	Wed Mar 02 22:46:25 2005 +0200
+++ b/src/lib-index/mail-transaction-log.h	Sat Mar 05 12:19:37 2005 +0200
@@ -1,15 +1,24 @@
 #ifndef __MAIL_TRANSACTION_LOG_H
 #define __MAIL_TRANSACTION_LOG_H
 
+#define MAIL_TRANSACTION_LOG_MAJOR_VERSION 1
+#define MAIL_TRANSACTION_LOG_MINOR_VERSION 0
+#define MAIL_TRANSACTION_LOG_HEADER_MIN_SIZE 24
+
 #define MAIL_TRANSACTION_LOG_PREFIX ".log"
 #define MAIL_TRANSACTION_LOG_ROTATE_SIZE (1024*128)
 #define MAIL_TRANSACTION_LOG_ROTATE_MIN_TIME (60*5)
 
 struct mail_transaction_log_header {
+	uint8_t major_version;
+	uint8_t minor_version;
+	uint16_t hdr_size;
+
 	uint32_t indexid;
 	uint32_t file_seq;
 	uint32_t prev_file_seq;
 	uint32_t prev_file_offset;
+	uint32_t create_stamp;
 };
 
 enum mail_transaction_type {