dovecot-2.1-pigeonhole: ManageSieve: fixed quota problem in prev...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Mon Jan 23 01:43:42 EET 2012


details:   http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/bc5acd9e957e
changeset: 1597:bc5acd9e957e
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Mon Jan 23 00:43:37 2012 +0100
description:
ManageSieve: fixed quota problem in previous change.

diffstat:

 src/managesieve/cmd-putscript.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r ae857042882b -r bc5acd9e957e src/managesieve/cmd-putscript.c
--- a/src/managesieve/cmd-putscript.c	Sun Jan 22 21:57:45 2012 +0100
+++ b/src/managesieve/cmd-putscript.c	Mon Jan 23 00:43:37 2012 +0100
@@ -311,7 +311,6 @@
 				return cmd_putscript_cancel(ctx, TRUE);
 		}
 		
-		ctx->max_script_size = ctx->script_size;
 	} else {
 		ctx->max_script_size = managesieve_quota_max_script_size(client);		
 	}
@@ -343,7 +342,8 @@
 
 	if (ctx->save_ctx != NULL) {
 		while (ctx->script_size == 0 || ctx->input->v_offset != ctx->script_size) {
-			if ( ctx->input->v_offset > ctx->max_script_size ) {
+			if ( ctx->max_script_size > 0 &&
+				ctx->input->v_offset > ctx->max_script_size ) {
 				(void)managesieve_quota_check_validsize(client, ctx->input->v_offset);
 				cmd_putscript_finish(ctx);
 				return TRUE;


More information about the dovecot-cvs mailing list