]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
assert
authorTimo Sirainen <tss@iki.fi>
Thu, 29 Apr 2004 00:13:05 +0000 (03:13 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 29 Apr 2004 00:13:05 +0000 (03:13 +0300)
--HG--
branch : HEAD

src/lib-index/mail-transaction-log.c

index ea3293a5dc531f600e9ea3e5d45e5b425f7fa5d6..2c12bc4028d0201a07eb40dcb7bf74acb53a9cd6 100644 (file)
@@ -334,6 +334,8 @@ mail_transaction_log_file_create(struct mail_transaction_log *log,
                hdr.prev_file_offset = index->hdr->log_file_offset;
        hdr.file_seq = index->hdr->log_file_seq+1;
 
+       i_assert(log->head == NULL || hdr.file_seq > log->head->hdr.file_seq);
+
        if (write_full(fd, &hdr, sizeof(hdr)) < 0) {
                mail_index_file_set_syscall_error(index, path, "write_full()");
                 (void)file_dotlock_delete(path, fd);