]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Stop namespaces_added|created hooks immediately when user has failed
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 14 Jan 2017 14:12:03 +0000 (16:12 +0200)
committerGitLab <gitlab@git.dovecot.net>
Sun, 15 Jan 2017 17:24:06 +0000 (19:24 +0200)
src/lib-storage/mail-storage-hooks.c

index 7bbd4c4ba8050cb72dba0b8a57ff511570455c45..282eb3def0e6c97b689abd9e73a310413f420747 100644 (file)
@@ -292,6 +292,8 @@ void hook_mail_namespaces_created(struct mail_namespace *namespaces)
        const struct mail_storage_hooks *const *hooks;
 
        array_foreach(&namespaces->user->hooks, hooks) {
+               if (namespaces->user->error != NULL)
+                       break;
                if ((*hooks)->mail_namespaces_created != NULL) T_BEGIN {
                        (*hooks)->mail_namespaces_created(namespaces);
                } T_END;
@@ -303,6 +305,8 @@ void hook_mail_namespaces_added(struct mail_namespace *namespaces)
        const struct mail_storage_hooks *const *hooks;
 
        array_foreach(&namespaces->user->hooks, hooks) {
+               if (namespaces->user->error != NULL)
+                       break;
                if ((*hooks)->mail_namespaces_added != NULL) T_BEGIN {
                        (*hooks)->mail_namespaces_added(namespaces);
                } T_END;