dovecot-2.0: quota: Set quota limit correctly (for code path tha...

dovecot at dovecot.org dovecot at dovecot.org
Mon Apr 4 23:07:39 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/8fa544520413
changeset: 12712:8fa544520413
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Apr 04 23:07:37 2011 +0300
description:
quota: Set quota limit correctly (for code path that doesn't exist).
quota_alloc() followed by quota_test/try_alloc() set the "quota left" limit
wrong. But this is only a theoretical problem, because nothing actually
calls quota_alloc() currently.

diffstat:

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

diffs (19 lines):

diff -r 10ea7f598e11 -r 8fa544520413 src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c	Mon Apr 04 19:20:20 2011 +0300
+++ b/src/plugins/quota/quota.c	Mon Apr 04 23:07:37 2011 +0300
@@ -958,7 +958,6 @@
 						 QUOTA_NAME_STORAGE_BYTES,
 						 &current, &limit);
 			if (ret > 0) {
-				current += ctx->bytes_used;
 				left = limit < current ? 0 : limit - current;
 				if (ctx->bytes_left > left)
 					ctx->bytes_left = left;
@@ -973,7 +972,6 @@
 						 QUOTA_NAME_MESSAGES,
 						 &current, &limit);
 			if (ret > 0) {
-				current += ctx->count_used;
 				left = limit < current ? 0 : limit - current;
 				if (ctx->count_left > left)
 					ctx->count_left = left;


More information about the dovecot-cvs mailing list