[dovecot-cvs] dovecot/src/lib-index mail-index-sync.c, 1.78, 1.79 mail-index-transaction-private.h, 1.31, 1.32 mail-index-transaction.c, 1.82, 1.83 mail-index-view-private.h, 1.25, 1.26

tss at dovecot.org tss at dovecot.org
Sun Oct 15 13:59:46 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv16975/lib-index

Modified Files:
	mail-index-sync.c mail-index-transaction-private.h 
	mail-index-transaction.c mail-index-view-private.h 
Log Message:
After saving messages the mailbox wasn't synced, which caused deliver to
treat the mailbox as unsynced and not update the indexes.



Index: mail-index-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- mail-index-sync.c	16 Sep 2006 13:40:17 -0000	1.78
+++ mail-index-sync.c	15 Oct 2006 12:59:43 -0000	1.79
@@ -449,6 +449,7 @@
 		return -1;
 	}
 
+	ctx->view->index_sync_view = TRUE;
 	*ctx_r = ctx;
 	*view_r = ctx->view;
 	return 1;

Index: mail-index-transaction-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction-private.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- mail-index-transaction-private.h	28 Jun 2006 16:31:05 -0000	1.31
+++ mail-index-transaction-private.h	15 Oct 2006 12:59:43 -0000	1.32
@@ -46,6 +46,8 @@
 	/* Module-specific contexts. See mail_index_module_id. */
 	ARRAY_DEFINE(mail_index_transaction_module_contexts, void);
 
+	/* this transaction was created for index_sync_view view */
+	unsigned int sync_transaction:1;
 	unsigned int hide_transaction:1;
 	unsigned int no_appends:1;
 	unsigned int appends_nonsorted:1;

Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- mail-index-transaction.c	17 Sep 2006 18:34:15 -0000	1.82
+++ mail-index-transaction.c	15 Oct 2006 12:59:43 -0000	1.83
@@ -956,6 +956,7 @@
 	t->hide_transaction = hide;
 	t->external = external;
 	t->first_new_seq = mail_index_view_get_messages_count(t->view)+1;
+	t->sync_transaction = view->index_sync_view;
 
 	if (view->syncing) {
 		/* transaction view cannot work if new records are being added

Index: mail-index-view-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-view-private.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- mail-index-view-private.h	28 Jun 2006 16:31:05 -0000	1.25
+++ mail-index-view-private.h	15 Oct 2006 12:59:43 -0000	1.26
@@ -63,6 +63,9 @@
 	unsigned int lock_id;
 
 	unsigned int inconsistent:1;
+	/* this view was created by mail_index_sync_begin() */
+	unsigned int index_sync_view:1;
+	/* this view is being synced */
 	unsigned int syncing:1;
 	unsigned int broken_counters:1;
 };



More information about the dovecot-cvs mailing list