dovecot-2.0: quota: Fixed ns=prefix to work for private namespaces.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Aug 3 15:10:24 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/7c4b4f07d64e
changeset: 11920:7c4b4f07d64e
user: Timo Sirainen <tss at iki.fi>
date: Tue Aug 03 13:10:19 2010 +0100
description:
quota: Fixed ns=prefix to work for private namespaces.
diffstat:
src/plugins/quota/quota-storage.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (28 lines):
diff -r ac31be20d279 -r 7c4b4f07d64e src/plugins/quota/quota-storage.c
--- a/src/plugins/quota/quota-storage.c Mon Aug 02 16:25:19 2010 +0100
+++ b/src/plugins/quota/quota-storage.c Tue Aug 03 13:10:19 2010 +0100
@@ -477,16 +477,18 @@
struct quota_root *root;
bool add;
+ /* see if we have a quota explicitly defined for this namespace */
+ quota = quota_get_mail_user_quota(ns->user);
+ root = quota_find_root_for_ns(quota, ns);
+ if (root != NULL)
+ root->ns = ns;
+
if ((ns->flags & NAMESPACE_FLAG_NOQUOTA) != 0)
add = FALSE;
else if (ns->owner == NULL) {
- /* see if we have a quota explicitly defined for
- this namespace */
- quota = quota_get_mail_user_quota(ns->user);
- root = quota_find_root_for_ns(quota, ns);
+ /* public namespace - add quota only if namespace is
+ explicitly defined for it */
add = root != NULL;
- if (root != NULL)
- root->ns = ns;
} else {
add = TRUE;
}
More information about the dovecot-cvs
mailing list