[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-sync-full.c,
1.3, 1.4
tss-movial at dovecot.org
tss-movial at dovecot.org
Tue Apr 18 17:49:42 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv25283
Modified Files:
dbox-sync-full.c
Log Message:
Don't assert-crash if first mail is expunged and we're doing a full sync.
Index: dbox-sync-full.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync-full.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dbox-sync-full.c 28 Jan 2006 22:05:48 -0000 1.3
+++ dbox-sync-full.c 18 Apr 2006 14:49:40 -0000 1.4
@@ -134,14 +134,19 @@
ARRAY_CREATE(&entry.uid_list, pool_datastack_create(),
struct seq_range, 64);
- do {
+ if (mbox->file->seeked_mail_header.expunged != '0') {
+ /* first mail expunged */
+ ret = dbox_file_seek_next_nonexpunged(mbox);
+ }
+ while (ret > 0) {
if (dbox_sync_full_mail(ctx, &seq) < 0)
return -1;
seq_range_array_add(&entry.uid_list, 0, seq);
seq_range_array_add(&ctx->exists, 0, seq);
- } while ((ret = dbox_file_seek_next_nonexpunged(mbox)) > 0);
+ ret = dbox_file_seek_next_nonexpunged(mbox);
+ }
dbox_uidlist_sync_append(ctx->uidlist_sync_ctx, &entry);
return ret;
}
More information about the dovecot-cvs
mailing list