[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.15, 1.16

cras at procontrol.fi cras at procontrol.fi
Mon May 3 16:58:37 EEST 2004


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

Modified Files:
	mail-transaction-log.c 
Log Message:
mail_transaction_log_append() - return seq/offset even if we didn't write
anything



Index: mail-transaction-log.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- mail-transaction-log.c	2 May 2004 12:57:29 -0000	1.15
+++ mail-transaction-log.c	3 May 2004 13:58:35 -0000	1.16
@@ -1051,15 +1051,17 @@
 	uoff_t append_offset;
 	int ret;
 
+	index = mail_index_view_get_index(view);
+	log = index->log;
+
 	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;
 		return 0;
 	}
 
-	index = mail_index_view_get_index(view);
-	log = index->log;
-
 	if (log->index->log_locked) {
 		i_assert(view->external);
 	} else {



More information about the dovecot-cvs mailing list