[dovecot-cvs] dovecot/src/lib-index mail-index-sync.c,1.12,1.13
cras at procontrol.fi
cras at procontrol.fi
Tue May 11 00:26:33 EEST 2004
Update of /home/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv14954/lib-index
Modified Files:
mail-index-sync.c
Log Message:
don't crash with assert if transacton log has expunge with seq 0
Index: mail-index-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-sync.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- mail-index-sync.c 9 May 2004 23:06:27 -0000 1.12
+++ mail-index-sync.c 10 May 2004 21:26:31 -0000 1.13
@@ -307,15 +307,9 @@
it's quite unlikely this expunge was caused by some bug. */
uint32_t uid1, uid2;
- if (next_exp->seq1 > ctx->view->map->records_count ||
- next_exp->seq2 > ctx->view->map->records_count) {
- mail_transaction_log_view_set_corrupted(
- ctx->view->log_view, "Expunge range %u..%u "
- "larger than message count %u",
- next_exp->seq1, next_exp->seq2,
- ctx->view->map->records_count);
+ mail_index_sync_get_expunge(sync_rec, next_exp);
+ if (mail_index_sync_rec_check(ctx->view, sync_rec) < 0)
return -1;
- }
if (mail_index_lookup_uid(ctx->view, next_exp->seq1, &uid1) < 0)
return -1;
@@ -330,13 +324,12 @@
return -1;
}
- mail_index_sync_get_expunge(sync_rec, next_exp);
ctx->expunge_idx++;
/* scan updates again from the beginning */
ctx->update_idx = 0;
ctx->next_seq = next_exp->seq2;
- return mail_index_sync_rec_check(ctx->view, sync_rec);
+ return 1;
}
if (ctx->sync_appends) {
More information about the dovecot-cvs
mailing list