]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Don't set storage callbacks before namespaces are created
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 15 Feb 2018 16:16:15 +0000 (18:16 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 19 Feb 2018 20:21:18 +0000 (22:21 +0200)
This fixes sending untagged OK/NO notifications from storage (e.g. lock
waits/override notifications). It was broken by
e031d9aaae59a9f79710dc1138b76b69272615a3

src/imap/imap-client.c

index f6cd4852888ec2395f94d174b19d2877d4c014c0..ff6494be448bb0443216934b19c98e03c616eb2a 100644 (file)
@@ -153,9 +153,6 @@ struct client *client_create(int fd_in, int fd_out, const char *session_id,
                                             &client->output);
        }
 
-       mail_namespaces_set_storage_callbacks(user->namespaces,
-                                             &mail_storage_callbacks, client);
-
        client->capability_string =
                str_new(client->pool, sizeof(CAPABILITY_STRING)+64);
 
@@ -220,6 +217,8 @@ int client_create_finish(struct client *client, const char **error_r)
 {
        if (mail_namespaces_init(client->user, error_r) < 0)
                return -1;
+       mail_namespaces_set_storage_callbacks(client->user->namespaces,
+                                             &mail_storage_callbacks, client);
        return 0;
 }