changeset 6464:90faec88598f HEAD

Synchronize mailbox after it has been opened.
author Timo Sirainen <tss@iki.fi>
date Sat, 22 Sep 2007 16:24:09 +0300
parents aeee5076f99f
children da4867da38c2
files src/plugins/quota/quota-count.c src/plugins/quota/quota-storage.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
@@ -22,6 +22,11 @@
 	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;
 
--- 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 @@
 	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;