[dovecot-cvs] dovecot/src/lib-index mail-transaction-log-view.c,
1.40, 1.41
cras at dovecot.org
cras at dovecot.org
Fri Apr 29 14:17:42 EEST 2005
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv3488
Modified Files:
mail-transaction-log-view.c
Log Message:
Added offsets to log file corruption error messages
Index: mail-transaction-log-view.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log-view.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- mail-transaction-log-view.c 26 Apr 2005 16:32:02 -0000 1.40
+++ mail-transaction-log-view.c 29 Apr 2005 11:17:40 -0000 1.41
@@ -344,23 +344,27 @@
if (hdr_size < sizeof(*hdr) + record_size) {
mail_transaction_log_file_set_corrupted(file,
- "record size too small (type=0x%x, size=%u)",
- hdr->type & MAIL_TRANSACTION_TYPE_MASK, hdr_size);
+ "record size too small (type=0x%x, "
+ "offset=%"PRIuUOFF_T", size=%u)",
+ hdr->type & MAIL_TRANSACTION_TYPE_MASK,
+ view->cur_offset, hdr_size);
return -1;
}
if ((hdr_size - sizeof(*hdr)) % record_size != 0) {
mail_transaction_log_file_set_corrupted(file,
- "record size wrong (type 0x%x, %u %% %u != 0)",
+ "record size wrong (type 0x%x, "
+ "offset=%"PRIuUOFF_T", size=%u %% %u != 0)",
hdr->type & MAIL_TRANSACTION_TYPE_MASK,
- (hdr_size - sizeof(*hdr)), record_size);
+ view->cur_offset, (hdr_size - sizeof(*hdr)),
+ record_size);
return -1;
}
if (file_size - view->cur_offset < hdr_size) {
mail_transaction_log_file_set_corrupted(file,
- "record size too large (type=0x%x, offset=%"PRIuUOFF_T
- ", size=%u, end=%"PRIuSIZE_T")",
+ "record size too large (type=0x%x, "
+ "offset=%"PRIuUOFF_T", size=%u, end=%"PRIuSIZE_T")",
hdr->type & MAIL_TRANSACTION_TYPE_MASK,
view->cur_offset, hdr_size, file_size);
return -1;
More information about the dovecot-cvs
mailing list