dovecot-2.2: quota: Added debug information for quota_over_flag ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Mar 27 21:40:33 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/750d46c4c111
changeset: 18392:750d46c4c111
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Mar 27 23:39:30 2015 +0200
description:
quota: Added debug information for quota_over_flag handling.

diffstat:

 src/plugins/quota/quota.c |  15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diffs (30 lines):

diff -r 11f7bbed333e -r 750d46c4c111 src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c	Wed Mar 25 10:11:35 2015 +0200
+++ b/src/plugins/quota/quota.c	Fri Mar 27 23:39:30 2015 +0200
@@ -996,11 +996,26 @@
 		ret = quota_get_resource(root, "", resources[i], &value, &limit);
 		if (ret < 0) {
 			/* can't reliably verify this */
+			if (root->quota->set->debug) {
+				i_debug("quota: Quota %s lookup failed - can't verify quota_over_flag",
+					resources[i]);
+			}
 			return;
 		}
+		if (root->quota->set->debug) {
+			i_debug("quota: quota_over_flag check: %s ret=%d value=%llu limit=%llu",
+				resources[i], ret,
+				(unsigned long long)value,
+				(unsigned long long)limit);
+		}
 		if (ret > 0 && value > limit)
 			cur_overquota = TRUE;
 	}
+	if (root->quota->set->debug) {
+		i_debug("quota: quota_over_flag=%d(%s) vs currently overquota=%d",
+			overquota_flag, overquota_value != NULL ? "(null)" : overquota_value,
+			cur_overquota);
+	}
 	if (cur_overquota != overquota_flag)
 		quota_warning_execute(root, overquota_script, overquota_value);
 }


More information about the dovecot-cvs mailing list