Skip to content

Commit

Permalink
imap: Don't set storage callbacks before namespaces are created
Browse files Browse the repository at this point in the history
This fixes sending untagged OK/NO notifications from storage (e.g. lock
waits/override notifications). It was broken by
e031d9a
  • Loading branch information
sirainen committed Feb 19, 2018
1 parent 2a2bf4b commit 1aec726
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/imap/imap-client.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 1aec726

Please sign in to comment.