[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.21, 1.22 mail-transaction-log.h, 1.7, 1.8

cras at procontrol.fi cras at procontrol.fi
Tue May 11 00:09:17 EEST 2004


Update of /home/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv14645/lib-index

Modified Files:
	mail-transaction-log.c mail-transaction-log.h 
Log Message:
When committing with no changes, don't try to sync them later.



Index: mail-transaction-log.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- mail-transaction-log.c	10 May 2004 21:01:31 -0000	1.21
+++ mail-transaction-log.c	10 May 2004 21:09:15 -0000	1.22
@@ -1104,8 +1104,8 @@
 	if (t->updates == NULL && t->cache_updates == NULL &&
 	    t->expunges == NULL && t->appends == NULL) {
 		/* nothing to append */
-		*log_file_seq_r = log->head->hdr.file_seq;
-		*log_file_offset_r = log->head->hdr.used_size;
+		*log_file_seq_r = 0;
+		*log_file_offset_r = 0;
 		return 0;
 	}
 

Index: mail-transaction-log.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-transaction-log.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mail-transaction-log.h	3 May 2004 22:19:39 -0000	1.7
+++ mail-transaction-log.h	10 May 2004 21:09:15 -0000	1.8
@@ -99,7 +99,8 @@
 
 /* Write data to transaction log. This is atomic operation. Sequences in
    updates[] and expunges[] are relative to given view, they're modified
-   to real ones. */
+   to real ones. If nothing is written, log_file_seq_r and log_file_offset_r
+   will be set to 0. */
 int mail_transaction_log_append(struct mail_index_transaction *t,
 				uint32_t *log_file_seq_r,
 				uoff_t *log_file_offset_r);



More information about the dovecot-cvs mailing list