dovecot-1.2: listescape: Fixed to work with dynamically created ...

dovecot at dovecot.org dovecot at dovecot.org
Sat Aug 15 01:47:19 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/a1b1a8b6555e
changeset: 9328:a1b1a8b6555e
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 14 18:46:44 2009 -0400
description:
listescape: Fixed to work with dynamically created shared namespaces.

diffstat:

1 file changed, 3 insertions(+), 23 deletions(-)
src/plugins/listescape/listescape-plugin.c |   26 +++-----------------------

diffs (60 lines):

diff -r be4a5cd32b29 -r a1b1a8b6555e src/plugins/listescape/listescape-plugin.c
--- a/src/plugins/listescape/listescape-plugin.c	Fri Aug 14 18:45:20 2009 -0400
+++ b/src/plugins/listescape/listescape-plugin.c	Fri Aug 14 18:46:44 2009 -0400
@@ -35,8 +35,6 @@ static void (*listescape_next_hook_mail_
 	(struct mail_storage *storage);
 static void (*listescape_next_hook_mailbox_list_created)
 	(struct mailbox_list *list);
-static void (*listescape_next_hook_mail_namespaces_created)
-	(struct mail_namespace *namespaces);
 static char escape_char = DEFAULT_ESCAPE_CHAR;
 
 static MODULE_CONTEXT_DEFINE_INIT(listescape_storage_module,
@@ -329,6 +327,8 @@ static void listescape_mailbox_list_crea
 	if (list->hierarchy_sep == list->ns->sep)
 		return;
 
+	list->ns->real_sep = list->ns->sep;
+
 	mlist = p_new(list->pool, struct listescape_mailbox_list, 1);
 	mlist->module_ctx.super = list->v;
 	mlist->list_name = str_new(list->pool, 256);
@@ -345,20 +345,6 @@ static void listescape_mailbox_list_crea
 	MODULE_CONTEXT_SET(list, listescape_list_module, mlist);
 }
 
-static void
-listescape_mail_namespaces_created(struct mail_namespace *namespaces)
-{
-	struct mail_namespace *ns = namespaces;
-
-	for (ns = namespaces; ns != NULL; ns = ns->next) {
-		if (ns->real_sep != ns->sep)
-			ns->real_sep = ns->sep;
-	}
-
-	if (listescape_next_hook_mail_namespaces_created != NULL)
-		listescape_next_hook_mail_namespaces_created(namespaces);
-}
-
 void listescape_plugin_init(void)
 {
 	const char *env;
@@ -372,16 +358,10 @@ void listescape_plugin_init(void)
 
 	listescape_next_hook_mailbox_list_created = hook_mailbox_list_created;
 	hook_mailbox_list_created = listescape_mailbox_list_created;
-
-	listescape_next_hook_mail_namespaces_created =
-		hook_mail_namespaces_created;
-	hook_mail_namespaces_created = listescape_mail_namespaces_created;
 }
 
 void listescape_plugin_deinit(void)
 {
 	hook_mail_storage_created = listescape_next_hook_mail_storage_created;
 	hook_mailbox_list_created = listescape_next_hook_mailbox_list_created;
-	hook_mail_namespaces_created =
-		listescape_next_hook_mail_namespaces_created;
-}
+}


More information about the dovecot-cvs mailing list