From 1aec726585792d8dde41ab5631b858f0010381ed Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 15 Feb 2018 18:16:15 +0200 Subject: [PATCH] imap: Don't set storage callbacks before namespaces are created 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index f6cd485288..ff6494be44 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -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; }