[dovecot-cvs] dovecot/src/lib-index mail-index-sync.c,1.34,1.35

cras at dovecot.org cras at dovecot.org
Mon Oct 11 16:15:01 EEST 2004


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

Modified Files:
	mail-index-sync.c 
Log Message:
Don't go trying to updating index, if there's nothing to update.



Index: mail-index-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- mail-index-sync.c	8 Oct 2004 17:51:48 -0000	1.34
+++ mail-index-sync.c	11 Oct 2004 13:14:59 -0000	1.35
@@ -453,9 +453,9 @@
 
 	mail_transaction_log_get_head(ctx->index->log, &seq, &offset);
 
-	if (ret == 0) {
-		hdr = ctx->index->hdr;
-
+	hdr = ctx->index->hdr;
+	if (ret == 0 && (hdr->log_file_seq != seq ||
+			 hdr->log_file_offset != offset)) {
 		if (mail_transaction_log_view_set(ctx->view->log_view,
 				hdr->log_file_seq, hdr->log_file_offset,
 				seq, offset, MAIL_TRANSACTION_TYPE_MASK) < 0)



More information about the dovecot-cvs mailing list