dovecot-2.1: imapc: Use EXAMINE command when possible.

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 4 11:30:18 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/54318eaada67
changeset: 13374:54318eaada67
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 04 10:30:21 2011 +0300
description:
imapc: Use EXAMINE command when possible.

diffstat:

 src/lib-storage/index/imapc/imapc-storage.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 9434093229aa -r 54318eaada67 src/lib-storage/index/imapc/imapc-storage.c
--- a/src/lib-storage/index/imapc/imapc-storage.c	Sun Sep 04 10:25:39 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-storage.c	Sun Sep 04 10:30:21 2011 +0300
@@ -312,6 +312,7 @@
 {
 	struct imapc_mailbox *mbox = (struct imapc_mailbox *)box;
 	struct imapc_open_context ctx;
+	bool examine;
 
 	if (index_storage_mailbox_open(box, FALSE) < 0)
 		return -1;
@@ -320,13 +321,15 @@
 		/* We don't actually want to SELECT the mailbox. */
 		return 0;
 	}
+	examine = (box->flags & MAILBOX_FLAG_READONLY) != 0 &&
+		(box->flags & MAILBOX_FLAG_DROP_RECENT) == 0;
 
 	mbox->opening = TRUE;
 	ctx.mbox = mbox;
 	ctx.ret = -2;
 	mbox->client_box =
 		imapc_client_mailbox_open(mbox->storage->client,
-					  box->name, FALSE,
+					  box->name, examine,
 					  imapc_mailbox_open_callback,
 					  &ctx, mbox);
 	while (ctx.ret == -2)


More information about the dovecot-cvs mailing list