[dovecot-cvs] dovecot/src/plugins/quota quota-maildir.c, 1.9.2.12, 1.9.2.13 quota-private.h, 1.7.2.4, 1.7.2.5
tss at dovecot.org
tss at dovecot.org
Mon Mar 12 22:36:48 EET 2007
Update of /var/lib/cvs/dovecot/src/plugins/quota
In directory talvi:/tmp/cvs-serv1451
Modified Files:
Tag: branch_1_0
quota-maildir.c quota-private.h
Log Message:
With ignore=box setting the quota was still updated for the mailbox even
though it was allowed to go over quota (but quota recount ignored the box).
Index: quota-maildir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-maildir.c,v
retrieving revision 1.9.2.12
retrieving revision 1.9.2.13
diff -u -d -r1.9.2.12 -r1.9.2.13
--- quota-maildir.c 6 Mar 2007 16:35:44 -0000 1.9.2.12
+++ quota-maildir.c 12 Mar 2007 20:36:45 -0000 1.9.2.13
@@ -687,6 +687,7 @@
strcmp(mailbox_get_name(box), root->ignore) == 0) {
ctx->bytes_limit = (uint64_t)-1;
ctx->count_limit = (uint64_t)-1;
+ ctx->ignored = TRUE;
return ctx;
}
@@ -710,7 +711,7 @@
(struct maildir_quota_root *)ctx->root;
int ret = ctx->bytes_current == (uint64_t)-1 ? -1 : 0;
- if (root->fd != -1 && ret == 0) {
+ if (root->fd != -1 && ret == 0 && !ctx->ignored) {
/* if writing fails, we don't care all that much */
(void)maildirsize_update(root,
maildir_quota_root_get_storage(ctx->root),
Index: quota-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-private.h,v
retrieving revision 1.7.2.4
retrieving revision 1.7.2.5
diff -u -d -r1.7.2.4 -r1.7.2.5
--- quota-private.h 3 Dec 2006 18:55:34 -0000 1.7.2.4
+++ quota-private.h 12 Mar 2007 20:36:45 -0000 1.7.2.5
@@ -101,6 +101,7 @@
uint64_t bytes_limit, count_limit;
uint64_t bytes_current, count_current;
+ unsigned int ignored:1;
unsigned int disabled:1;
};
More information about the dovecot-cvs
mailing list