mail-cache-sync-update.c revision 74eff344f67ca582eec8c38dfdc6f5f6faa21fd8
/* Copyright (C) 2004 Timo Sirainen */
#include "lib.h"
#include "file-cache.h"
#include "mail-cache-private.h"
#include "mail-index-view-private.h"
#include "mail-index-sync-private.h"
struct mail_cache_sync_context {
unsigned int locked:1;
unsigned int lock_failed:1;
};
struct mail_cache_sync_context *ctx)
{
return;
}
struct mail_cache *cache)
{
int ret;
return 1;
if (ctx->lock_failed)
return 0;
return ret;
}
}
return 1;
}
{
const struct mail_index_ext *ext;
return 0;
return 1;
}
{
int ret;
return 1;
}
if (*cache_offset == 0)
return 1;
if (MAIL_CACHE_IS_UNUSABLE(cache))
return 1;
if (ret <= 0)
return 1;
if (!MAIL_CACHE_IS_UNUSABLE(cache) &&
return 1;
}
void **context)
{
int ret;
if (new_cache_offset == NULL) {
return 1;
}
if (MAIL_CACHE_IS_UNUSABLE(cache))
return 1;
(uoff_t)-1);
}
if (*old_cache_offset == 0 ||
return 1;
/* we'll need to link the old and new cache records */
if (ret <= 0)
return 1;
/* cache has been compressed, don't modify it */
return 1;
}
return -1;
return 1;
}