mail-cache.c revision 89a126810703c666309310d0f3189e9834d70b5b
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi/* Copyright (c) 2003-2007 Dovecot authors, see the included COPYING file */
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomivoid mail_cache_set_syscall_error(struct mail_cache *cache,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi "%s failed with index cache file %s: %m",
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomivoid mail_cache_set_corrupted(struct mail_cache *cache, const char *fmt, ...)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi /* mark the cache as unusable */
de1c645a79d42c37dffb7f52e9c643b6251fdcd0Aki Tuomi mail_index_set_error(cache->index, "Corrupted index cache file %s: %s",
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomivoid mail_cache_file_close(struct mail_cache *cache)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi if (munmap(cache->mmap_base, cache->mmap_length) < 0)
86ad487452c763152f3ff4dd4650512f3cecdc55Aki Tuomistatic void mail_cache_init_file_cache(struct mail_cache *cache)
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
if (size == 0)
if (ret < 0) {
int ret;
if (ret > 0)
if (ret < 0) {
return ret;
return cache;
return cache;
return cache;
int ret;
if (ret <= 0)
return ret;
int i, ret;
return ret;
if (ret <= 0)
ret = 0;
if (ret > 0) {
sizeof(struct mail_cache_header));
return ret;
unsigned int cont_percentage;
int ret = 0;
return ret;
struct mail_cache_view *
return view;