quota.c revision fd1f0e9ef52b3e157cfd1a01c464c2ac7458ab17
f4975a306e56ecda451c0b25e6fe230075e67c1dEugen Kuksa/* Copyright (c) 2005-2007 Dovecot authors, see the included COPYING file */
f4975a306e56ecda451c0b25e6fe230075e67c1dEugen Kuksa unsigned int i;
67ea9fccbdc154cf2418f16ab8883ccfcbc77b51Model Renamerunsigned int quota_module_id = 0;
f4975a306e56ecda451c0b25e6fe230075e67c1dEugen Kuksaextern struct quota_backend quota_backend_dirsize;
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksaextern struct quota_backend quota_backend_maildir;
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksastatic const struct quota_backend *quota_backends[] = {
185e0dda526bdea41c570ed716693efad0bfef9eEugen Kuksastatic int quota_default_test_alloc(struct quota_transaction_context *ctx,
a38bf57c270c2677788657bc8a912f14de3c8d7eEugen Kuksa root_p = array_idx_modifiable("a->roots, 0);
8f845e804ef24c045876941e34930a9ac6720dbfEugen Kuksastatic const struct quota_backend *quota_backend_find(const char *name)
a38bf57c270c2677788657bc8a912f14de3c8d7eEugen Kuksa unsigned int i;
a38bf57c270c2677788657bc8a912f14de3c8d7eEugen Kuksa for (i = 0; i < N_ELEMENTS(quota_backends); i++) {
a38bf57c270c2677788657bc8a912f14de3c8d7eEugen Kuksastruct quota_root *quota_root_init(struct quota *quota, const char *root_def)
a38bf57c270c2677788657bc8a912f14de3c8d7eEugen Kuksa /* <backend>[:<quota root name>[:<backend args>]] */
t_pop();
if (p == NULL) {
return NULL;
return root;
unsigned int i, count;
for (i = 0; i < count; i++) {
for (i = 0; i < count; i++)
static struct quota_rule *
unsigned int i, count;
for (i = 0; i < count; i++) {
return &rules[i];
return NULL;
if (percentage < 0) {
i_unreached();
const char **args;
switch (i_toupper(*p)) {
error_r) < 0)
const char **error_r)
const char *p, *mailbox_name;
int ret = 0;
if (p == NULL) {
t_push();
t_pop();
return ret;
const char *mailbox_name,
bool found;
return found;
unsigned int i, j, count;
bool is_file;
for (i = 0; i < count; i++) {
&is_file);
for (i = 0; i < count; i++) {
unsigned int i, count;
for (i = 0; i < count; i++) {
const char **error_r)
int ret;
if (p == NULL) {
t_push();
error_r);
t_pop();
if (ret < 0)
struct quota_root_iter *
return iter;
unsigned int count;
int ret;
return NULL;
if (ret == 0) {
if (ret > 0) {
iter->i++;
return root;
unsigned int i, count;
for (i = 0; i < count; i++) {
return roots[i];
return NULL;
int ret;
*limit_r = 0;
return ctx;
const char *mailbox_name;
unsigned int i, count;
int ret;
for (i = 0; i < count; i++) {
if (ret > 0) {
} else if (ret < 0) {
if (ret > 0) {
} else if (ret < 0) {
if (ret < 0) {
unsigned int i, count;
if (count == 0)
for (i = 0; i < count; i++) {
unsigned int i, count;
int ret = 0;
for (i = 0; i < count; i++) {
return ret;
int ret;
if (ret <= 0)
return ret;
unsigned int i, count;
for (i = 0; i < count; i++) {