ret = 0;
}
} else {
- ret = 1;
+ ret = 0;
*bytes += root->quota->set->vsizes ?
metadata.virtual_size : metadata.physical_size;
*count += status.messages;
{
struct quota_mailbox_iter *iter;
const struct mailbox_info *info;
- int ret = 0, ret2;
+ int ret = 1;
*bytes_r = *count_r = 0;
if (root->recounting)
iter = quota_mailbox_iter_begin(root);
while ((info = quota_mailbox_iter_next(iter)) != NULL) {
- ret2 = quota_count_mailbox(root, info->ns, info->vname,
- bytes_r, count_r);
- if (ret2 > 0)
- ret = 1;
- else if (ret2 < 0) {
+ if (quota_count_mailbox(root, info->ns, info->vname,
+ bytes_r, count_r) < 0) {
ret = -1;
break;
}
void quota_root_recalculate_relative_rules(struct quota_root_settings *root_set,
int64_t bytes_limit,
int64_t count_limit);
+/* Returns 1 if values were returned successfully, 0 if we're recursing into
+ the same function, -1 if error. */
int quota_count(struct quota_root *root, uint64_t *bytes_r, uint64_t *count_r);
int quota_root_parse_grace(struct quota_root_settings *root_set,