From: Timo Sirainen Date: Wed, 3 Feb 2021 18:37:49 +0000 (+0200) Subject: lib-storage: Initialize service_user's logging before creating ioloop context X-Git-Tag: 2.3.15~356 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d46404a323b42855e0ba6de9bf3f156beade1deb;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Initialize service_user's logging before creating ioloop context Needed by the next change. --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index 85c3d81dfc..94189899c4 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -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,