maildir-uidlist.c revision 2bde8972f2dcec46d96543407cc5b56954054359
39N/A#include "file-dotlock.h"
51N/A#include "close-keep-errno.h"
1352N/A#include "nfs-workarounds.h"
1066N/A#include "eacces-error.h"
1231N/A#include "maildir-storage.h"
1352N/A#include "maildir-filename.h"
1352N/A#include "maildir-uidlist.h"
39N/Astruct maildir_uidlist_rec {
39N/Astruct maildir_uidlist {
48N/A unsigned int lock_count;
39N/A unsigned int change_counter;
838N/A unsigned int hdr_next_uid;
1431N/Astruct maildir_uidlist_sync_ctx {
926N/A unsigned int new_files_count;
926N/A unsigned int finish_change_counter;
59N/Astruct maildir_uidlist_iter_ctx {
1045N/A unsigned int change_counter;
72N/A bool refresh_when_locked)
838N/A const char *control_dir;
1386N/A unsigned int *uid_validity_r,
1386N/A unsigned int *next_uid_r)
956N/A case UIDLIST_VERSION:
956N/A last_read_offset = 0;
956N/A orig_uid_validity != 0) {
bool recreated;
int ret;
if (ret <= 0) {
if (!recreated)
bool retry;
int ret;
if (!retry)
if (ret >= 0) {
return ret;
int ret;
return ret;
const char **fname_r)
int ret;
return ret;
int ret;
return NULL;
if (*p == (unsigned char)key)
return NULL;
const char *value)
unsigned int len;
if (*p != (unsigned char)key)
p += len;
const char *value)
int ret;
if (ret <= 0) {
if (ret < 0)
T_BEGIN {
} T_END;
const char *strp;
unsigned int len;
int ret;
if (ret < 0) {
unsigned int i, count;
seq++;
seq++; i++;
for (; i < count; i++)
if (ret == 0) {
if (ret < 0) {
if (ret < 0)
return ret;
int ret;
return ret;
unsigned int min_rewrite_count;
return FALSE;
return TRUE;
return FALSE;
return TRUE;
return TRUE;
bool nonsynced)
unsigned int i, count;
if (nonsynced) {
for (i = 0; i < count; i++)
for (i = 0; i < count; i++)
bool *locked_r)
int ret;
if (ret <= 0) {
return ret;
bool locked;
int ret;
if (ret <= 0)
return ret;
unsigned int count;
if (uid != 0) {
unsigned char *ret;
return NULL;
T_BEGIN {
unsigned int len;
} T_END;
return ret;
const char *filename,
const char *p, *dir;
MAILDIR_UIDLIST_REC_FLAG_MOVED)) == 0) {
if (uid != 0) {
const char *filename)
unsigned int idx;
const char *value)
const char *filename)
return FALSE;
return TRUE;
const char *filename)
const char *filename)
T_BEGIN {
} T_END;
bool success)
int ret;
if (!success)
return ret;
const char *filename,
struct maildir_uidlist_iter_ctx *
unsigned int count;
return ctx;
idx++;
idx--;
return FALSE;
return TRUE;
const char **filename_r)
return FALSE;
return TRUE;