Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1964:8e0cc5b87eab HEAD
mail_transaction_log_append() - return seq/offset even if we didn't write
anything
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 03 May 2004 16:58:35 +0300 |
parents | db06a387ef1a |
children | 41f6a04154a3 |
files | src/lib-index/mail-transaction-log.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log.c Mon May 03 16:53:35 2004 +0300 +++ b/src/lib-index/mail-transaction-log.c Mon May 03 16:58:35 2004 +0300 @@ -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 {