dovecot-2.0: lazy-expunge: Use mailbox_list_created hook to over...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Aug 5 19:08:06 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/756752d91378
changeset: 11946:756752d91378
user: Timo Sirainen <tss at iki.fi>
date: Thu Aug 05 17:07:56 2010 +0100
description:
lazy-expunge: Use mailbox_list_created hook to override list methods.
diffstat:
src/plugins/lazy-expunge/lazy-expunge-plugin.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (43 lines):
diff -r c92414173290 -r 756752d91378 src/plugins/lazy-expunge/lazy-expunge-plugin.c
--- a/src/plugins/lazy-expunge/lazy-expunge-plugin.c Thu Aug 05 17:07:35 2010 +0100
+++ b/src/plugins/lazy-expunge/lazy-expunge-plugin.c Thu Aug 05 17:07:56 2010 +0100
@@ -490,11 +490,10 @@
}
}
-static void lazy_expunge_mail_namespace_storage_added(struct mail_namespace *ns)
+static void lazy_expunge_mailbox_list_created(struct mailbox_list *list)
{
- struct mailbox_list *list = ns->list;
struct lazy_expunge_mail_user *luser =
- LAZY_EXPUNGE_USER_CONTEXT(ns->user);
+ LAZY_EXPUNGE_USER_CONTEXT(list->ns->user);
struct lazy_expunge_mailbox_list *llist;
const char *const *p;
unsigned int i;
@@ -506,13 +505,13 @@
quota plugin sees it */
p = t_strsplit_spaces(luser->env, " ");
for (i = 0; i < LAZY_NAMESPACE_COUNT && *p != NULL; i++, p++) {
- if (strcmp(ns->prefix, *p) == 0) {
- ns->flags |= NAMESPACE_FLAG_NOQUOTA;
+ if (strcmp(list->ns->prefix, *p) == 0) {
+ list->ns->flags |= NAMESPACE_FLAG_NOQUOTA;
break;
}
}
- if (luser != NULL && ns->type == NAMESPACE_PRIVATE) {
+ if (luser != NULL && list->ns->type == NAMESPACE_PRIVATE) {
llist = p_new(list->pool, struct lazy_expunge_mailbox_list, 1);
MODULE_CONTEXT_SET(list, lazy_expunge_mailbox_list_module,
llist);
@@ -589,7 +588,7 @@
static struct mail_storage_hooks lazy_expunge_mail_storage_hooks = {
.mail_user_created = lazy_expunge_mail_user_created,
.mail_namespaces_created = lazy_expunge_mail_namespaces_created,
- .mail_namespace_storage_added = lazy_expunge_mail_namespace_storage_added,
+ .mailbox_list_created = lazy_expunge_mailbox_list_created,
.mailbox_allocated = lazy_expunge_mailbox_allocated,
.mail_allocated = lazy_expunge_mail_allocated
};
More information about the dovecot-cvs
mailing list