dovecot-2.2: lib-storage: Fixed crash if shared namespace had su...

dovecot at dovecot.org dovecot at dovecot.org
Fri Mar 22 17:44:06 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/6f5b14d4ad56
changeset: 16091:6f5b14d4ad56
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Mar 22 17:43:52 2013 +0200
description:
lib-storage: Fixed crash if shared namespace had subscriptions=yes

diffstat:

 src/lib-storage/index/shared/shared-list.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 304cd3067061 -r 6f5b14d4ad56 src/lib-storage/index/shared/shared-list.c
--- a/src/lib-storage/index/shared/shared-list.c	Fri Mar 22 17:30:36 2013 +0200
+++ b/src/lib-storage/index/shared/shared-list.c	Fri Mar 22 17:43:52 2013 +0200
@@ -2,6 +2,7 @@
 
 #include "lib.h"
 #include "imap-match.h"
+#include "mailbox-tree.h"
 #include "mailbox-list-private.h"
 #include "index-storage.h"
 #include "shared-storage.h"
@@ -175,9 +176,15 @@
 }
 
 static int
-shared_list_subscriptions_refresh(struct mailbox_list *src_list ATTR_UNUSED,
-				  struct mailbox_list *dest_list ATTR_UNUSED)
+shared_list_subscriptions_refresh(struct mailbox_list *src_list,
+				  struct mailbox_list *dest_list)
 {
+	char sep;
+
+	if (dest_list->subscriptions == NULL) {
+		sep = mail_namespace_get_sep(src_list->ns);
+		dest_list->subscriptions = mailbox_tree_init(sep);
+	}
 	return 0;
 }
 


More information about the dovecot-cvs mailing list