# HG changeset patch # User Timo Sirainen # Date 1453113086 -7200 # Node ID d622d86032903cb5ff90d302173da1718e85cbc7 # Parent 9703d0af2e3b19f36a1a2fb35ce12110fcd9cb0b quota: Fixed namespace filtering for dict and count backends. diff -r 9703d0af2e3b -r d622d8603290 src/plugins/quota/quota-count.c --- a/src/plugins/quota/quota-count.c Sat Jan 16 21:47:53 2016 +0200 +++ b/src/plugins/quota/quota-count.c Mon Jan 18 12:31:26 2016 +0200 @@ -100,10 +100,12 @@ if (iter->iter == NULL) { namespaces = array_get(&iter->root->quota->namespaces, &count); - if (iter->ns_idx >= count) - return NULL; + do { + if (iter->ns_idx >= count) + return NULL; - iter->ns = namespaces[iter->ns_idx++]; + iter->ns = namespaces[iter->ns_idx++]; + } while (!quota_root_is_namespace_visible(iter->root, iter->ns)); iter->iter = mailbox_list_iter_init(iter->ns->list, "*", MAILBOX_LIST_ITER_SKIP_ALIASES | MAILBOX_LIST_ITER_RETURN_NO_FLAGS |