]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Initialize service_user's logging before creating ioloop context
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 3 Feb 2021 18:37:49 +0000 (20:37 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 24 Feb 2021 17:19:49 +0000 (17:19 +0000)
Needed by the next change.

src/lib-storage/mail-storage-service.c

index 85c3d81dfcd6d9b8b90428e7d4f7339d1f38a612..94189899c4c55d77027c02fcb69b0a1e49831b7e 100644 (file)
@@ -1504,6 +1504,9 @@ mail_storage_service_next_real(struct mail_storage_service_ctx *ctx,
                set_keyval(ctx, user, "mail_home", priv.home);
        }
 
+       if ((user->flags & MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT) == 0)
+               mail_storage_service_init_log(ctx, user, &priv);
+
        /* create ioloop context regardless of logging. it's also used by
           stats plugin. */
        if (user->ioloop_ctx == NULL) {
@@ -1513,8 +1516,6 @@ mail_storage_service_next_real(struct mail_storage_service_ctx *ctx,
                                      mail_storage_service_io_deactivate_user_cb,
                                      user);
        }
-       if ((user->flags & MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT) == 0)
-               mail_storage_service_init_log(ctx, user, &priv);
 
        if ((user->flags & MAIL_STORAGE_SERVICE_FLAG_NO_RESTRICT_ACCESS) == 0) {
                if (service_drop_privileges(user, &priv,