]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Set client created before initializing namespaces
authorAki Tuomi <aki.tuomi@dovecot.fi>
Wed, 26 Jul 2017 16:42:48 +0000 (19:42 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 16 Aug 2017 08:17:30 +0000 (11:17 +0300)
Fixes Panic: file master-service.c: line 819 (master_service_client_connection_destroyed): assertion failed: (service->master_status.available_count < service->total_available_count)

src/imap/imap-master-client.c

index e00b4631864e61d3258df14e23a067412e3bc135..be71b4c6583e64facf9ed1a466409725bb5c82ab 100644 (file)
@@ -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,