may change these by reading the limits elsewhere (e.g. Maildir++,
FS quota) */
int64_t bytes_limit, count_limit;
- /* 1 = quota root has resources and should be returned when iterating
- quota roots, 0 = not, -1 = unknown. */
- int resource_ret;
/* Module-specific contexts. See quota_module_id. */
ARRAY(void) quota_module_contexts;
struct quota_root *root;
root = root_set->backend->v.alloc();
- root->resource_ret = -1;
root->pool = pool_alloconly_create("quota root", 512);
root->set = root_set;
root->quota = quota;
{
struct quota_root *const *roots, *root = NULL;
unsigned int count;
- uint64_t value, limit;
- int ret;
if (iter->quota == NULL)
return NULL;
if (!quota_root_is_visible(roots[iter->i], iter->box, FALSE))
continue;
- ret = roots[iter->i]->resource_ret;
- if (ret == -1) {
- ret = quota_get_resource(roots[iter->i], "",
- QUOTA_NAME_STORAGE_KILOBYTES,
- &value, &limit);
- }
- if (ret == 0) {
- ret = quota_get_resource(roots[iter->i], "",
- QUOTA_NAME_MESSAGES,
- &value, &limit);
- }
- roots[iter->i]->resource_ret = ret;
- if (ret > 0) {
- root = roots[iter->i];
- break;
- }
+ root = roots[iter->i];
+ break;
}
iter->i++;