[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.37,
1.38
cras at procontrol.fi
cras at procontrol.fi
Sat Jun 19 21:36:27 EEST 2004
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv8827/lib-storage/index/mbox
Modified Files:
mbox-sync.c
Log Message:
index errors always need to store the error message to store
Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- mbox-sync.c 19 Jun 2004 18:21:44 -0000 1.37
+++ mbox-sync.c 19 Jun 2004 18:36:25 -0000 1.38
@@ -268,8 +268,10 @@
}
ret = mail_index_sync_next(sync_ctx->index_sync_ctx, sync_rec);
- if (ret < 0)
+ if (ret < 0) {
+ mail_storage_set_index_error(sync_ctx->ibox);
return -1;
+ }
if (ret == 0) {
memset(sync_rec, 0, sizeof(*sync_rec));
@@ -634,8 +636,10 @@
uint64_t offset;
if (mail_index_lookup_uid_range(sync_ctx->sync_view, uid, uid,
- &seq, &seq) < 0)
+ &seq, &seq) < 0) {
+ mail_storage_set_index_error(sync_ctx->ibox);
return -1;
+ }
if (seq == 0)
return 0;
@@ -1085,16 +1089,19 @@
if (ret < 0)
mail_index_transaction_rollback(sync_ctx.t);
- else if (mail_index_transaction_commit(sync_ctx.t, &seq, &offset) < 0)
+ else if (mail_index_transaction_commit(sync_ctx.t, &seq, &offset) < 0) {
+ mail_storage_set_index_error(ibox);
ret = -1;
- else {
+ } else {
ibox->commit_log_file_seq = 0;
ibox->commit_log_file_offset = 0;
}
sync_ctx.t = NULL;
- if (mail_index_sync_end(index_sync_ctx) < 0)
+ if (mail_index_sync_end(index_sync_ctx) < 0) {
+ mail_storage_set_index_error(ibox);
ret = -1;
+ }
if (sync_ctx.base_uid_last != sync_ctx.next_uid-1 && ret == 0 &&
!ibox->mbox_readonly) {
@@ -1108,17 +1115,21 @@
if (ret < 0)
mail_storage_set_index_error(ibox);
else {
- ret = mail_index_get_header(sync_ctx.sync_view,
+ (void)mail_index_get_header(sync_ctx.sync_view,
&sync_ctx.hdr);
if ((ret = mbox_sync_update_imap_base(&sync_ctx)) < 0)
mail_index_transaction_rollback(sync_ctx.t);
else if (mail_index_transaction_commit(sync_ctx.t,
&seq,
- &offset) < 0)
+ &offset) < 0) {
+ mail_storage_set_index_error(ibox);
ret = -1;
+ }
- if (mail_index_sync_end(sync_ctx.index_sync_ctx) < 0)
+ if (mail_index_sync_end(sync_ctx.index_sync_ctx) < 0) {
+ mail_storage_set_index_error(ibox);
ret = -1;
+ }
}
}
More information about the dovecot-cvs
mailing list