mail-transaction-log.c revision 2ca4cb08680aebb1474d762738cf436871f095fb
6cf3ba1dcf972672069f0826427619587d32d9e6Tim Reddehase/* Copyright (C) 2003-2004 Timo Sirainen */
6cf3ba1dcf972672069f0826427619587d32d9e6Tim Reddehase/* this lock should never exist for a long time.. */
6cf3ba1dcf972672069f0826427619587d32d9e6Tim Reddehase#define LOG_DOTLOCK_IMMEDIATE_STALE_TIMEOUT 300
const char *path);
int lock_type);
int lock_type);
const char *fmt, ...)
t_push();
t_pop();
sizeof(struct mail_transaction_log_header)) || \
unsigned int lock_id;
int ret;
if (ret == 0) {
if (ret <= 0)
return ret;
struct mail_transaction_log *
const char *path;
return NULL;
return log;
int lock_type)
int ret;
if (ret < 0) {
if (ret == 0) {
if (ret > 0) {
if (ret < 0) {
int lock_type)
int ret;
if (ret > 0) {
if (ret < 0) {
int ret;
if (ret < 0) {
if (ret == 0) {
unsigned int lock_id;
fd);
return fd2;
if (ret < 0)
if (fd2 < 0) {
return fd2;
if (fd2 < 0) {
return fd2;
static struct mail_transaction_log_file *
struct mail_transaction_log_file **p;
int ret;
return NULL;
if (ret == 0) {
if (ret <= 0) {
return NULL;
*p = file;
return file;
static struct mail_transaction_log_file *
const char *path)
int fd;
return NULL;
return NULL;
if ((*p)->refcount != 0)
p = &(*p)->next;
*p = next;
int lock_type)
int fd;
unsigned int lock_id;
int ret;
return ret;
const char *path;
int ret;
void *data;
int ret;
ret = 0;
if (ret <= 0)
return ret;
size = 0;
if (size == 0)
ret = 0;
return ret;
if (!use_mmap) {
if (ret <= 0) {
if (ret < 0) {
return ret;
int ret = 0;
if (ret < 0)
return ret;
const void *data)
if (deleted) {
dest++;
struct mail_index_transaction *t)
const void *data;
int ret;
case MAIL_TRANSACTION_APPEND:
case MAIL_TRANSACTION_CACHE_RESET: {
return ret;
if (size == 0)
hdr_size = 0;
if (external)
if (hdr_size > 0) {
struct mail_transaction_cache_reset u;
memset(&u, 0, sizeof(u));
return buf;
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) {
u.size);
state = 0;
return buf;
int ret;
*log_file_seq_r = 0;
*log_file_offset_r = 0;
unsigned int lock_id;
seq = 0;
F_UNLCK);
ret = 0;
if (t->new_cache_file_seq != 0) {
if (ret == 0) {
t->hide_transaction) {
if (ret < 0) {
return ret;