dovecot-1.1: quota debug: Hide "(0%)" if quota limits aren't def...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jan 21 19:37:13 EET 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/6ba45ed14f7f
changeset: 8113:6ba45ed14f7f
user: Timo Sirainen <tss at iki.fi>
date: Wed Jan 21 12:37:07 2009 -0500
description:
quota debug: Hide "(0%)" if quota limits aren't defined defined in percentages.
diffstat:
1 file changed, 7 insertions(+), 4 deletions(-)
src/plugins/quota/quota.c | 11 +++++++----
diffs (23 lines):
diff -r 0a8a3fa5a036 -r 6ba45ed14f7f src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c Wed Jan 21 12:29:49 2009 -0500
+++ b/src/plugins/quota/quota.c Wed Jan 21 12:37:07 2009 -0500
@@ -533,12 +533,15 @@ int quota_root_add_warning_rule(struct q
quota_root_recalculate_relative_rules(root);
if (root->quota->debug) {
- i_info("Quota warning: bytes=%llu (%u%%) "
- "messages=%llu (%u%%) command=%s",
+ i_info("Quota warning: bytes=%llu%s "
+ "messages=%llu%s command=%s",
(unsigned long long)warning->rule.bytes_limit,
- warning->rule.bytes_percent,
+ warning->rule.bytes_percent == 0 ? "" :
+ t_strdup_printf(" (%u%%)", warning->rule.bytes_percent),
(unsigned long long)warning->rule.count_limit,
- warning->rule.count_percent, warning->command);
+ warning->rule.count_percent == 0 ? "" :
+ t_strdup_printf(" (%u%%)", warning->rule.count_percent),
+ warning->command);
}
return 0;
}
More information about the dovecot-cvs
mailing list