dovecot-2.0: dsync: Fixed creating \noselect mailboxes.

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 14 18:43:13 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/02d78c4a0a51
changeset: 12116:02d78c4a0a51
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 14 16:43:10 2010 +0100
description:
dsync: Fixed creating \noselect mailboxes.

diffstat:

 src/dsync/dsync-worker-local.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 7305a7787536 -r 02d78c4a0a51 src/dsync/dsync-worker-local.c
--- a/src/dsync/dsync-worker-local.c	Tue Sep 14 16:20:18 2010 +0100
+++ b/src/dsync/dsync-worker-local.c	Tue Sep 14 16:43:10 2010 +0100
@@ -1109,8 +1109,9 @@
 	struct local_dsync_mailbox *lbox;
 	const char *name;
 
-	lbox = hash_table_lookup(worker->mailbox_hash,
-				 &dsync_box->mailbox_guid);
+	lbox = dsync_mailbox_is_noselect(dsync_box) ? NULL :
+		hash_table_lookup(worker->mailbox_hash,
+				  &dsync_box->mailbox_guid);
 	if (lbox != NULL) {
 		/* use the existing known mailbox name */
 		return mailbox_alloc(lbox->ns->list, lbox->storage_name, 0);
@@ -1125,8 +1126,10 @@
 
 	name = local_worker_convert_mailbox_name(worker, name, ns,
 						 dsync_box, creating);
-	local_dsync_worker_add_mailbox(worker, ns, name,
-				       &dsync_box->mailbox_guid);
+	if (!dsync_mailbox_is_noselect(dsync_box)) {
+		local_dsync_worker_add_mailbox(worker, ns, name,
+					       &dsync_box->mailbox_guid);
+	}
 	return mailbox_alloc(ns->list, name, 0);
 }
 


More information about the dovecot-cvs mailing list