From: Timo Sirainen Date: Thu, 23 Sep 2010 19:04:40 +0000 (+0100) Subject: quota: When logging about obsolete rule, log the full rule string. X-Git-Tag: 2.0.4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5183f82691b9c6e5707d93fe57336cd89462d574;p=thirdparty%2Fdovecot%2Fcore.git quota: When logging about obsolete rule, log the full rule string. --- diff --git a/src/plugins/quota/quota.c b/src/plugins/quota/quota.c index e4f64de717..b29e067d5e 100644 --- a/src/plugins/quota/quota.c +++ b/src/plugins/quota/quota.c @@ -409,6 +409,7 @@ void quota_root_recalculate_relative_rules(struct quota_root_settings *root_set, 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 @@ quota_rule_parse_limits(struct quota_root_settings *root_set, } 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 @@ int quota_root_add_rule(struct quota_root_settings *root_set, } 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 @@ int quota_root_add_warning_rule(struct quota_root_settings *root_set, 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;