index-transaction.c revision a2f250a332dfc1e6cd4ffd196c621eb9dbf7b8a1
/* Copyright (c) 2003-2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "index-storage.h"
#include "index-mail.h"
void index_transaction_init(struct index_transaction_context *t,
struct index_mailbox *ibox)
{
sizeof(void *), 5);
}
static void index_transaction_free(struct index_transaction_context *t)
{
i_free(t);
}
int index_transaction_finish_commit(struct index_transaction_context *t,
{
int ret;
i_assert(t->mail_ref_count == 0);
if (ret < 0)
else {
if (*log_file_seq_r != 0) {
}
}
return ret;
}
void index_transaction_finish_rollback(struct index_transaction_context *t)
{
i_assert(t->mail_ref_count == 0);
}
struct mailbox_transaction_context *
{
struct mail_index_transaction *t;
struct index_transaction_context *it;
if ((flags & MAILBOX_TRANSACTION_FLAG_HIDE) != 0)
if ((flags & MAILBOX_TRANSACTION_FLAG_EXTERNAL) != 0)
it = MAIL_STORAGE_CONTEXT(t);
i_panic("mail storage transaction context mising for type %s",
}
return &it->mailbox_ctx;
}
{
struct index_transaction_context *t =
(struct index_transaction_context *)_t;
*uid_validity_r = 0;
*first_saved_uid_r = *last_saved_uid_r = 0;
}
{
struct index_transaction_context *t =
(struct index_transaction_context *)_t;
}