From: Aki Tuomi Date: Wed, 26 Jul 2017 16:42:48 +0000 (+0300) Subject: imap: Set client created before initializing namespaces X-Git-Tag: 2.2.32.rc2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3240e15e780e010c46df5d6e08f7d4cef02854a6;p=thirdparty%2Fdovecot%2Fcore.git imap: Set client created before initializing namespaces Fixes Panic: file master-service.c: line 819 (master_service_client_connection_destroyed): assertion failed: (service->master_status.available_count < service->total_available_count) --- diff --git a/src/imap/imap-master-client.c b/src/imap/imap-master-client.c index e00b463186..be71b4c658 100644 --- a/src/imap/imap-master-client.c +++ b/src/imap/imap-master-client.c @@ -229,14 +229,16 @@ imap_master_client_input_args(struct connection *conn, const char *const *args, i_close_fd(&fd_client); return -1; } + client->imap_client_created = TRUE; + if (mail_namespaces_init(imap_client->user, &error) < 0) { - i_error("%s", error); + i_error("imap-master(%s): mail_namespaces_init() failed: %s", + input.username, error); client_destroy(imap_client, error); return -1; } /* log prefix is set at this point, so we don't need to add the username anymore to the log messages */ - client->imap_client_created = TRUE; o_stream_nsend(imap_client->output, master_input.client_output->data,