mail-transaction-log-append.c revision dffa503fd4ce31334346e539496084c80a2d8d37
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen/* Copyright (c) 2003-2009 Dovecot authors, see the included COPYING file */
d03a871a77f8ec36f48f5fea98d810e51b186fdbTimo Sirainenstatic void log_append_buffer(struct log_append_context *ctx,
static const buffer_t *
struct mail_transaction_header_update u;
int state = 0;
memset(&u, 0, sizeof(u));
if (state == 0) {
state++;
if (state > 0) {
state = 0;
return buf;
if (reset_id == 0)
reset_id++;
unsigned int count;
if (t->reset ||
count = 0;
if (reset_id != 0) {
struct mail_transaction_ext_hdr_update u;
memset(&u, 0, sizeof(u));
if (!started) {
if (started) {
update_count = 0;
resize_count = 0;
reset_id_count = 0;
reset_count = 0;
hdrs_count = 0;
T_BEGIN {
} T_END;
reset_id_count = 0;
static enum mail_index_sync_type
const char *const *keywords;
for (i = 0; i < count; i++) {
return change_mask;
struct mail_transaction_header_update *u;
sizeof(struct mail_transaction_header) +
sizeof(*u) + sizeof(offset);
sizeof(*u) + sizeof(offset));
#define TRANSACTION_HAS_CHANGES(t) \
bool want_fsync;
if (t->reset) {
if (!TRANSACTION_HAS_CHANGES(t)) {
MAIL_INDEX_SYNC_HANDLER_HEAD) <= 0)
if (t->max_modseq != 0)
if (!TRANSACTION_HAS_CHANGES(t)) {
if (t->pre_hdr_changed) {
if (t->post_hdr_changed) {
int ret;
*log_file_seq_r = 0;
*log_file_offset_r = 0;
return ret;