dovecot-2.0: quota: When logging about obsolete rule, log the fu...

dovecot at dovecot.org dovecot at dovecot.org
Thu Sep 23 22:05:23 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/a15b0d032c27
changeset: 12170:a15b0d032c27
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Sep 23 20:04:40 2010 +0100
description:
quota: When logging about obsolete rule, log the full rule string.

diffstat:

 src/plugins/quota/quota.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 8e057c95e44e -r a15b0d032c27 src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c	Thu Sep 23 20:00:41 2010 +0100
+++ b/src/plugins/quota/quota.c	Thu Sep 23 20:04:40 2010 +0100
@@ -409,6 +409,7 @@
 static int
 quota_rule_parse_limits(struct quota_root_settings *root_set,
 			struct quota_rule *rule, const char *limits,
+			const char *full_rule_def,
 			bool relative_rule, const char **error_r)
 {
 	const char **args, *key, *value;
@@ -435,10 +436,11 @@
 			}
 			value++;
 		} else if (*value != '-' && relative_rule) {
-			i_warning("quota root %s: "
+			i_warning("quota root %s rule %s: "
 				  "obsolete configuration for rule '%s' "
 				  "should be changed to '%s=+%s'",
-				  root_set->name, *args, key, value);
+				  root_set->name, full_rule_def,
+				  *args, key, value);
 		}
 
 		if (strcmp(key, "storage") == 0) {
@@ -551,7 +553,7 @@
 	} else {
 		bool relative_rule = rule != &root_set->default_rule;
 
-		if (quota_rule_parse_limits(root_set, rule, p,
+		if (quota_rule_parse_limits(root_set, rule, p, rule_def,
 					    relative_rule, error_r) < 0)
 			ret = -1;
 	}
@@ -714,7 +716,7 @@
 
 	memset(&rule, 0, sizeof(rule));
 	ret = quota_rule_parse_limits(root_set, &rule, t_strdup_until(q, p),
-				      FALSE, error_r);
+				      rule_def, FALSE, error_r);
 	if (ret < 0)
 		return -1;
 


More information about the dovecot-cvs mailing list