dovecot-2.2: quota: Recalculation now also counts the namespace ...
dovecot at dovecot.org
dovecot at dovecot.org
Sun May 20 03:26:34 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/4c8f79d1f9f1
changeset: 14498:4c8f79d1f9f1
user: Timo Sirainen <tss at iki.fi>
date: Mon Apr 23 13:19:44 2012 +0300
description:
quota: Recalculation now also counts the namespace prefix mailbox's quota if it exists.
diffstat:
src/plugins/quota/quota-count.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r f24cdf8b0624 -r 4c8f79d1f9f1 src/plugins/quota/quota-count.c
--- a/src/plugins/quota/quota-count.c Mon Apr 23 12:58:42 2012 +0300
+++ b/src/plugins/quota/quota-count.c Mon Apr 23 13:19:44 2012 +0300
@@ -83,7 +83,12 @@
}
if (mailbox_list_iter_deinit(&ctx) < 0)
ret = -1;
-
+ if (ns->prefix_len > 0 && ret == 0 &&
+ (ns->prefix_len != 6 || strncasecmp(ns->prefix, "INBOX", 5) != 0)) {
+ /* if the namespace prefix itself exists, count it also */
+ const char *name = t_strndup(ns->prefix, ns->prefix_len-1);
+ ret = quota_count_mailbox(root, ns, name, bytes, count);
+ }
return ret;
}
More information about the dovecot-cvs
mailing list