[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.96,
1.97
cras at dovecot.org
cras at dovecot.org
Tue Oct 5 03:50:31 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox
mbox-sync-private.h, 1.34, 1.35 mbox-sync-rewrite.c, 1.31,
1.32 mbox-sync.c, 1.95, 1.96
- Next message: [dovecot-cvs]
dovecot/src/lib Makefile.am, 1.43, 1.44 str-sanitize.c,
NONE, 1.1 str-sanitize.h, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv2052/lib-storage/index/mbox
Modified Files:
mbox-sync.c
Log Message:
Don't loop forever if sync record UIDs don't exist anymore.
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- mbox-sync.c 5 Oct 2004 00:26:40 -0000 1.96
+++ mbox-sync.c 5 Oct 2004 00:50:28 -0000 1.97
@@ -705,6 +705,7 @@
mbox_sync_seek_to_uid(struct mbox_sync_context *sync_ctx, uint32_t uid)
{
uint32_t seq1, seq2;
+ uoff_t file_size;
if (mail_index_lookup_uid_range(sync_ctx->sync_view, uid, (uint32_t)-1,
&seq1, &seq2) < 0) {
@@ -712,6 +713,19 @@
return -1;
}
+ if (seq1 == 0) {
+ /* doesn't exist anymore, seek to end of file */
+ file_size = i_stream_get_size(sync_ctx->ibox->mbox_file_stream);
+ if (istream_raw_mbox_seek(sync_ctx->ibox->mbox_stream,
+ file_size) < 0) {
+ mail_storage_set_critical(sync_ctx->ibox->box.storage,
+ "Error seeking to end of mbox file %s",
+ sync_ctx->ibox->path);
+ return -1;
+ }
+ return 1;
+ }
+
return mbox_sync_seek_to_seq(sync_ctx, seq1);
}
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox
mbox-sync-private.h, 1.34, 1.35 mbox-sync-rewrite.c, 1.31,
1.32 mbox-sync.c, 1.95, 1.96
- Next message: [dovecot-cvs]
dovecot/src/lib Makefile.am, 1.43, 1.44 str-sanitize.c,
NONE, 1.1 str-sanitize.h, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list