maildir-keywords.c revision 2615df45a8027948a474abe5e817b34b0499c171
2e37d45867d081db150ab78dad303b9077aea24fTimo Sirainen/* Copyright (c) 2005-2009 Dovecot authors, see the included COPYING file */
b565a6a7a66fb9f224d00c06a950e3c1c585c18eTimo Sirainen/* note that everything here depends on uidlist file being locked the whole
b565a6a7a66fb9f224d00c06a950e3c1c585c18eTimo Sirainen time. that's why we don't have any locking of our own, or that we do things
0536ccb51d41e3078c3a9fa33e509fb4b2420f95Timo Sirainen that would be racy otherwise. */
b565a6a7a66fb9f224d00c06a950e3c1c585c18eTimo Sirainen/* how many seconds to wait before overriding dovecot-keywords.lock */
b565a6a7a66fb9f224d00c06a950e3c1c585c18eTimo Sirainen unsigned int chridx_to_idx[MAILDIR_MAX_KEYWORDS];
b565a6a7a66fb9f224d00c06a950e3c1c585c18eTimo Sirainenstruct maildir_keywords *maildir_keywords_init(struct maildir_mailbox *mbox)
b565a6a7a66fb9f224d00c06a950e3c1c585c18eTimo Sirainen mk = maildir_keywords_init_readonly(&mbox->ibox.box);
b565a6a7a66fb9f224d00c06a950e3c1c585c18eTimo Sirainenmaildir_keywords_init_readonly(struct mailbox *box)
const char *dir;
return mk;
const char **strp;
if (p == NULL) {
unsigned int *chridx_r)
if (p == NULL) {
if (p == NULL)
unsigned int chridx)
const char **strp;
char *new_name;
unsigned int *chridx_r)
const char *const *keywords;
unsigned int i, count;
int ret;
return ret;
for (i = 0; i < count; i++) {
*chridx_r = i;
const char *const *keywords;
unsigned int count;
return NULL;
return NULL;
const char *const *keywords;
unsigned int i, count;
for (i = 0; i < count; i++) {
const char *lock_path;
int i, fd;
struct maildir_keywords_sync_ctx *
return ctx;
struct maildir_keywords_sync_ctx *
return ctx;
T_BEGIN {
} T_END;
char keyword)
const char *name;
return idx;
unsigned int idx)
const char *const *name_p;
char *chr_p;
unsigned int chridx;
int ret;
return *chr_p;
if (ret <= 0)
return *chr_p;