]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
trash plugin: Use correct hook for overriding mail_user vfuncs
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 22 Feb 2017 15:45:34 +0000 (17:45 +0200)
committerGitLab <gitlab@git.dovecot.net>
Wed, 22 Feb 2017 18:07:09 +0000 (20:07 +0200)
This was always wrong to do, and it crashes after
f32382d2da479a4371e08c443679528db37ea988

src/plugins/trash/trash-plugin.c

index ae5e4171101e94edea3bece2f15b65dcd84f80f0..7129d3daf468b060198f48e773cbd2a57ac665f6 100644 (file)
@@ -333,9 +333,8 @@ static int read_configuration(struct mail_user *user, const char *path)
 }
 
 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 @@ trash_mail_namespaces_created(struct mail_namespace *namespaces)
 }
 
 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)