changeset 21677:9479458bcc69

trash plugin: Use correct hook for overriding mail_user vfuncs This was always wrong to do, and it crashes after f32382d2da479a4371e08c443679528db37ea988
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 22 Feb 2017 17:45:34 +0200
parents 8ecc25852f37
children 3243312b3d88
files src/plugins/trash/trash-plugin.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/trash/trash-plugin.c	Wed Feb 22 17:21:56 2017 +0200
+++ b/src/plugins/trash/trash-plugin.c	Wed Feb 22 17:45:34 2017 +0200
@@ -333,9 +333,8 @@
 }
 
 static void
-trash_mail_namespaces_created(struct mail_namespace *namespaces)
+trash_mail_user_created(struct mail_user *user)
 {
-	struct mail_user *user = namespaces->user;
 	struct quota_user *quser = QUOTA_USER_CONTEXT(user);
 	struct trash_user *tuser;
 	const char *env;
@@ -359,7 +358,7 @@
 }
 
 static struct mail_storage_hooks trash_mail_storage_hooks = {
-	.mail_namespaces_created = trash_mail_namespaces_created
+	.mail_user_created = trash_mail_user_created
 };
 
 void trash_plugin_init(struct module *module)