[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-file.c, 1.11,
1.12 mbox-sync.c, 1.159, 1.160
cras at dovecot.org
cras at dovecot.org
Sun May 8 17:13:00 EEST 2005
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv3797/lib-storage/index/mbox
Modified Files:
mbox-file.c mbox-sync.c
Log Message:
Added some error handling code to prevent assert crashes.
Index: mbox-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-file.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mbox-file.c 26 Apr 2005 14:52:02 -0000 1.11
+++ mbox-file.c 8 May 2005 14:12:58 -0000 1.12
@@ -137,6 +137,7 @@
mail_storage_set_critical(STORAGE(mbox->storage),
"Cached message offset lost for seq %u in mbox file %s",
seq, mbox->path);
+ mbox->mbox_sync_dirty = TRUE;
return 0;
}
@@ -154,6 +155,7 @@
mail_storage_set_critical(STORAGE(mbox->storage),
"Cached message offset %s is invalid for mbox file %s",
dec2str(offset), mbox->path);
+ mbox->mbox_sync_dirty = TRUE;
return 0;
}
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- mbox-sync.c 26 Apr 2005 21:27:08 -0000 1.159
+++ mbox-sync.c 8 May 2005 14:12:58 -0000 1.160
@@ -961,6 +961,15 @@
if (mail_ctx->uid_broken && partial) {
/* UID ordering problems, resync everything to make
sure we get everything right */
+ if (sync_ctx->mbox->mbox_sync_dirty)
+ return 0;
+
+ mail_storage_set_critical(
+ STORAGE(sync_ctx->mbox->storage),
+ "UIDs broken with partial sync in mbox file %s",
+ sync_ctx->mbox->path);
+
+ sync_ctx->mbox->mbox_sync_dirty = TRUE;
return 0;
}
More information about the dovecot-cvs
mailing list