dovecot-2.2: dsync: Open mailboxes with readonly-flag whenever p...

dovecot at dovecot.org dovecot at dovecot.org
Tue Mar 3 17:35:45 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/06c4c42549a7
changeset: 18287:06c4c42549a7
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Mar 03 19:34:59 2015 +0200
description:
dsync: Open mailboxes with readonly-flag whenever possible.
There shouldn't be any actual functional difference though.

diffstat:

 src/doveadm/dsync/dsync-brain-mailbox-tree.c |  2 +-
 src/doveadm/dsync/dsync-brain.c              |  3 ++-
 src/doveadm/dsync/dsync-mailbox-tree-fill.c  |  2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r ef0bfe110ed9 -r 06c4c42549a7 src/doveadm/dsync/dsync-brain-mailbox-tree.c
--- a/src/doveadm/dsync/dsync-brain-mailbox-tree.c	Tue Mar 03 19:32:28 2015 +0200
+++ b/src/doveadm/dsync/dsync-brain-mailbox-tree.c	Tue Mar 03 19:34:59 2015 +0200
@@ -173,7 +173,7 @@
 	struct mailbox *box;
 	bool ret;
 
-	box = mailbox_alloc(ns->list, vname, 0);
+	box = mailbox_alloc(ns->list, vname, MAILBOX_FLAG_READONLY);
 	ret = mailbox_verify_create_name(box) == 0;
 	mailbox_free(&box);
 	return ret;
diff -r ef0bfe110ed9 -r 06c4c42549a7 src/doveadm/dsync/dsync-brain.c
--- a/src/doveadm/dsync/dsync-brain.c	Tue Mar 03 19:32:28 2015 +0200
+++ b/src/doveadm/dsync/dsync-brain.c	Tue Mar 03 19:34:59 2015 +0200
@@ -148,7 +148,8 @@
 	struct mail_namespace *ns;
 
 	ns = mail_namespace_find(brain->user->namespaces, vname);
-	brain->virtual_all_box = mailbox_alloc(ns->list, vname, 0);
+	brain->virtual_all_box =
+		mailbox_alloc(ns->list, vname, MAILBOX_FLAG_READONLY);
 }
 
 struct dsync_brain *
diff -r ef0bfe110ed9 -r 06c4c42549a7 src/doveadm/dsync/dsync-mailbox-tree-fill.c
--- a/src/doveadm/dsync/dsync-mailbox-tree-fill.c	Tue Mar 03 19:32:28 2015 +0200
+++ b/src/doveadm/dsync/dsync-mailbox-tree-fill.c	Tue Mar 03 19:34:59 2015 +0200
@@ -89,7 +89,7 @@
 	}
 
 	/* get GUID and UIDVALIDITY for selectable mailbox */
-	box = mailbox_alloc(info->ns->list, info->vname, 0);
+	box = mailbox_alloc(info->ns->list, info->vname, MAILBOX_FLAG_READONLY);
 	if (dsync_mailbox_tree_get_selectable(box, &metadata, &status) < 0) {
 		errstr = mailbox_get_last_error(box, &error);
 		switch (error) {


More information about the dovecot-cvs mailing list