[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-mail.c, 1.8,
1.9 dbox-sync.c, 1.12, 1.13
cras at dovecot.org
cras at dovecot.org
Thu Apr 27 16:36:26 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv12900
Modified Files:
dbox-mail.c dbox-sync.c
Log Message:
Error fixes
Index: dbox-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-mail.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dbox-mail.c 20 Apr 2006 14:15:58 -0000 1.8
+++ dbox-mail.c 27 Apr 2006 13:36:24 -0000 1.9
@@ -63,7 +63,7 @@
mail_storage_set_critical(STORAGE(mbox->storage),
"Cached message offset lost for seq %u in "
- "dbox file %s", seq, mbox->path);
+ "dbox %s", seq, mbox->path);
/* resync and try again */
if (dbox_sync(mbox, TRUE) < 0)
@@ -115,7 +115,7 @@
mail_storage_set_critical(STORAGE(mbox->storage),
"Cached message offset (%u, %"PRIuUOFF_T") "
- "broken for uid %u in dbox file %s",
+ "broken for uid %u in dbox %s",
file_seq, offset, mail->mail.mail.uid,
mbox->path);
return -1;
Index: dbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- dbox-sync.c 20 Apr 2006 16:12:29 -0000 1.12
+++ dbox-sync.c 27 Apr 2006 13:36:24 -0000 1.13
@@ -45,6 +45,13 @@
if (dbox_sync_get_file_offset(ctx, seq, &file_seq, &offset) < 0)
return -1;
+ if (file_seq == 0) {
+ mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ "Cached message offset lost for seq %u in "
+ "dbox %s", seq, ctx->mbox->path);
+ return -1;
+ }
+
file_seqs = array_get(&ctx->added_file_seqs, &count);
for (i = 0; i < count; i++) {
if (file_seqs[i] == file_seq) {
More information about the dovecot-cvs
mailing list