[dovecot-cvs] dovecot/src/lib-index mail-index-private.h, 1.48,
1.49 mail-index.c, 1.189, 1.190
cras at dovecot.org
cras at dovecot.org
Sat Mar 5 21:13:27 EET 2005
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv16192
Modified Files:
mail-index-private.h mail-index.c
Log Message:
Some error handling path crashfixes.
Index: mail-index-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-private.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- mail-index-private.h 5 Feb 2005 12:01:49 -0000 1.48
+++ mail-index-private.h 5 Mar 2005 19:13:24 -0000 1.49
@@ -21,7 +21,7 @@
#define MAIL_INDEX_ESTALE_RETRY_COUNT 10
#define MAIL_INDEX_MAP_IS_IN_MEMORY(map) \
- ((map)->buffer != NULL)
+ ((map) != NULL && (map)->buffer != NULL)
#define MAIL_INDEX_MAP_IDX(map, idx) \
((struct mail_index_record *) \
Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -d -r1.189 -r1.190
--- mail-index.c 5 Mar 2005 12:41:22 -0000 1.189
+++ mail-index.c 5 Mar 2005 19:13:24 -0000 1.190
@@ -771,8 +771,9 @@
sync_to_index = TRUE;
}
- if ((*map)->hdr.indexid != 0) {
- /* sync this as a view from transaction log. */
+ if ((*map)->hdr.indexid != 0 && index->log != NULL) {
+ /* we're not creating the index, or opening transaction log.
+ sync this as a view from transaction log. */
index->sync_update = TRUE;
ret = mail_index_sync_from_transactions(index, map,
sync_to_index);
More information about the dovecot-cvs
mailing list