mail-index.c revision ceac664d4dbada5edccb5def4e49c6ff6da8ceb4
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2003-2017 Dovecot authors, see the included COPYING file */
2ac5f36aa7c2e7a07ba8815d43a6d7483f62e74cTimo Sirainenstruct mail_index_module_register mail_index_module_register = { 0 };
5dc71fc15055d1de5e7db1bc56d12606c80ce7c4Timo Sirainenstatic void mail_index_close_nonopened(struct mail_index *index);
76adf7943137e72c20b2a0913ce2fc53548a19f6Timo Sirainenstatic const struct mail_index_optimization_settings default_optimization_set = {
5dc71fc15055d1de5e7db1bc56d12606c80ce7c4Timo Sirainenstruct mail_index *mail_index_alloc(struct event *parent_event,
76adf7943137e72c20b2a0913ce2fc53548a19f6Timo Sirainen event_add_category(index->event, &event_category_index);
5dc71fc15055d1de5e7db1bc56d12606c80ce7c4Timo Sirainen pool_alloconly_create(MEMPOOL_GROWING"index extension", 1024);
76adf7943137e72c20b2a0913ce2fc53548a19f6Timo Sirainen p_array_init(&index->extensions, index->extension_pool, 5);
5dc71fc15055d1de5e7db1bc56d12606c80ce7c4Timo Sirainen index->optimization_set = default_optimization_set;
5dc71fc15055d1de5e7db1bc56d12606c80ce7c4Timo Sirainen mail_index_ext_register(index, MAIL_INDEX_EXT_KEYWORDS,
5dc71fc15055d1de5e7db1bc56d12606c80ce7c4Timo Sirainen index->keywords_pool = pool_alloconly_create("keywords", 512);
return index;
return FALSE;
return FALSE;
return TRUE;
unsigned int max_timeout_secs)
return ext_id;
unsigned int i, count;
for (i = 0; i < count; i++) {
*ext_id_r = i;
return TRUE;
return FALSE;
void *context)
unsigned int i, count;
for (i = 0; i < count; i++) {
char *key;
void *value;
return TRUE;
return FALSE;
const char *keyword,
unsigned int *idx_r)
char *keyword_dup;
struct mail_keywords *
const char *const keywords[])
struct mail_keywords *k;
if (count == 0) {
for (i = 0; i < src; i++) {
if (i == src)
dest++;
struct mail_keywords *
struct mail_keywords *k;
const unsigned int *indexes;
if (count == 0) {
for (i = 0; i < src; i++) {
if (i == src)
int ret;
if (ret == 0) {
return ret;
const char *path;
int fd;
return fd;
const char *dir;
return NULL;
int ret;
if (ret == 0) {
if (ret >= 0) {
if (ret == 0) {
if (ret == 0) {
if (ret < 0) {
int ret;
return ret;
int ret;
return ret;
return ret;
int ret;
const char *path;
int last_errno = 0;
if (last_errno == 0)
const char **reason_r)
int ret;
goto final;
else if (ret > 0)
return ret;
int ret;
const char *path;
*mtime_r = 0;
const char *function)
const char *filepath,
const char *function)
const char *errstr;