mail-index.c revision 190237ce467d2389dfb809874b0fec86d3c7968d
1116N/A#include "mmap-util.h"
1116N/A#include "nfs-workarounds.h"
1116N/A#include "read-full.h"
1116N/A#include "write-full.h"
1116N/A#include "mail-index-private.h"
1116N/A#include "mail-index-sync-private.h"
1116N/A#include "mail-transaction-log.h"
1116N/A#include "mail-cache.h"
1116N/Aunsigned int mail_index_module_id = 0;
3158N/A unsigned int initial_count)
1116N/A#define EXT_GLOBAL_ALLOC_SIZE \
1116N/A#define EXT_PER_ALLOC_SIZE \
unsigned int i, size;
for (i = 0; i < size; i++) {
idx = 0;
return idx;
return FALSE;
return TRUE;
unsigned int i, old_count;
const char *name;
for (i = 0; i < old_count; i++)
t_push();
t_pop();
t_pop();
t_pop();
t_pop();
unsigned int *idx_r)
char *keyword_dup;
void *value;
return TRUE;
if (!autocreate) {
return FALSE;
return TRUE;
const char *name;
#ifdef DEBUG
const unsigned int *old_idx;
unsigned int idx;
unsigned int idx;
#ifndef WORDS_BIGENDIAN
sizeof(struct mail_index_record));
unsigned int records_count;
int ret;
pos = 0;
if (ret > 0)
return ret;
pos);
if (ret > 0) {
if (ret < 0) {
if (ret == 0) {
&prev_offset);
bool sync_to_index)
const void *tdata;
int ret;
if (sync_to_index) {
MAIL_TRANSACTION_TYPE_MASK) <= 0) {
&skipped)) > 0) {
ret = 0;
&prev_offset);
return ret;
bool sync_to_index)
unsigned int i, count;
int ret;
bool retry;
if (ret != 0)
return ret;
for (i = 0; i < count; i++)
return ret;
if (ret <= 0) {
if (ret == 0) {
int ret;
if (ret > 0)
int ret;
if (ret != 0) {
return ret;
if (ret > 0) {
if (ret < 0)
ret = 0;
else if (ret == 0) {
if (ret <= 0) {
return ret;
int ret;
if (ret > 0)
return ret;
&pos);
if (ret <= 0) {
if (ret == 0) {
if (ret < 0)
return ret;
struct mail_index_map *
unsigned int i, count;
for (i = 0; i < count; i++) {
return mem_map;
unsigned int lock_id;
int ret;
*lock_id_r = 0;
if (ret <= 0)
return ret;
if (ret == 0) {
*lock_id_r = 0;
return ret;
const char *path;
int fd;
return fd;
const char *path;
int ret;
if (ret != 0) {
/* create it fully in index.tmp first */
if (ret == 0) {
if (ret < 0) {
return ret;
#ifndef WORDS_BIGENDIAN
unsigned int lock_id = 0;
int ret;
if (ret > 0)
else if (ret == 0) {
} else if (ret < 0)
if (ret == 0)
if (lock_id != 0) {
lock_id = 0;
if (lock_id == 0) {
int i = 0, ret;
if (ret <= 0)
if (ret == 0) {
if (ret <= 0)
return ret;
ret = 0;
if (ret > 0)
else if (ret == 0) {
if (ret == 0) {
if (lock_id != 0)
if (ret == 0) {
return ret;
unsigned int lock_id;
int ret;
int ret = 0;
return ret;
const char *function)
const char *filepath,
const char *function)
return MAIL_INDEX_ERROR_DISKSPACE;
return MAIL_INDEX_ERROR_INTERNAL;
return MAIL_INDEX_ERROR_NONE;