dovecot: Synchronize mailbox after it has been opened.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Sep 22 16:25:21 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/90faec88598f
changeset: 6464:90faec88598f
user: Timo Sirainen <tss at iki.fi>
date: Sat Sep 22 16:24:09 2007 +0300
description:
Synchronize mailbox after it has been opened.
diffstat:
2 files changed, 10 insertions(+)
src/plugins/quota/quota-count.c | 5 +++++
src/plugins/quota/quota-storage.c | 5 +++++
diffs (30 lines):
diff -r aeee5076f99f -r 90faec88598f src/plugins/quota/quota-count.c
--- a/src/plugins/quota/quota-count.c Sat Sep 22 16:21:20 2007 +0300
+++ b/src/plugins/quota/quota-count.c Sat Sep 22 16:24:09 2007 +0300
@@ -21,6 +21,11 @@ static int quota_count_mailbox(struct ma
MAILBOX_OPEN_READONLY | MAILBOX_OPEN_KEEP_RECENT);
if (box == NULL)
return -1;
+
+ if (mailbox_sync(box, MAILBOX_SYNC_FLAG_FULL_READ, 0, NULL) < 0) {
+ mailbox_close(&box);
+ return -1;
+ }
memset(&search_arg, 0, sizeof(search_arg));
search_arg.type = SEARCH_ALL;
diff -r aeee5076f99f -r 90faec88598f src/plugins/quota/quota-storage.c
--- a/src/plugins/quota/quota-storage.c Sat Sep 22 16:21:20 2007 +0300
+++ b/src/plugins/quota/quota-storage.c Sat Sep 22 16:24:09 2007 +0300
@@ -403,6 +403,11 @@ quota_mailbox_list_delete(struct mailbox
if (box == NULL)
return -1;
+ if (mailbox_sync(box, MAILBOX_SYNC_FLAG_FULL_READ, 0, NULL) < 0) {
+ mailbox_close(&box);
+ return -1;
+ }
+
memset(&search_arg, 0, sizeof(search_arg));
search_arg.type = SEARCH_ALL;
More information about the dovecot-cvs
mailing list