]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail_transaction_log_append() - return seq/offset even if we didn't write
authorTimo Sirainen <tss@iki.fi>
Mon, 3 May 2004 13:58:35 +0000 (16:58 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 3 May 2004 13:58:35 +0000 (16:58 +0300)
anything

--HG--
branch : HEAD

src/lib-index/mail-transaction-log.c

index 11c78199bd4153a419208df42c4e27ea7a4d4125..070d5a171d452175b5bea6e52e8ce29dd6ad283a 100644 (file)
@@ -1051,15 +1051,17 @@ int mail_transaction_log_append(struct mail_index_transaction *t,
        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 {