[dovecot-cvs] dovecot/src/lib-index mail-index-sync.c, 1.72.2.2, 1.72.2.3
tss at dovecot.org
tss at dovecot.org
Sun Nov 12 15:20:37 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv19401
Modified Files:
Tag: branch_1_0
mail-index-sync.c
Log Message:
Don't crash if syncing breaks.
Index: mail-index-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync.c,v
retrieving revision 1.72.2.2
retrieving revision 1.72.2.3
diff -u -d -r1.72.2.2 -r1.72.2.3
--- mail-index-sync.c 28 May 2006 21:18:27 -0000 1.72.2.2
+++ mail-index-sync.c 12 Nov 2006 15:20:35 -0000 1.72.2.3
@@ -625,7 +625,8 @@
*_ctx = NULL;
mail_index_unlock(ctx->index, ctx->lock_id);
- i_assert(!ctx->index->map->write_to_disk);
+ i_assert(ctx->index->map == NULL ||
+ !ctx->index->map->write_to_disk);
mail_transaction_log_sync_unlock(ctx->index->log);
mail_index_view_close(&ctx->view);
@@ -678,8 +679,11 @@
}
}
- index->sync_log_file_seq = index->map->hdr.log_file_seq;
- index->sync_log_file_offset = index->map->hdr.log_file_int_offset;
+ if (ret == 0) {
+ index->sync_log_file_seq = index->map->hdr.log_file_seq;
+ index->sync_log_file_offset =
+ index->map->hdr.log_file_int_offset;
+ }
mail_index_sync_end(_ctx);
return ret;
More information about the dovecot-cvs
mailing list