]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT to not change log prefix in...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 28 Sep 2022 13:21:26 +0000 (16:21 +0300)
committerMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Tue, 4 Oct 2022 05:46:53 +0000 (08:46 +0300)
This didn't appear to cause any visible bugs with the current code, but is
required by the next commit.

Broken by ad13ab0702141065b79a1b7e8f2833e5b93871a4

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

index 567ecb8bc36f648c18ac81e7ed03089e2481e6cd..a5c47b57fe61e41936cbb5539e17f00073b992bf 100644 (file)
@@ -795,14 +795,14 @@ void mail_storage_service_io_deactivate_user(struct mail_storage_service_user *u
 static void
 mail_storage_service_io_activate_user_cb(struct mail_storage_service_user *user)
 {
-       if (user->log_prefix != NULL)
+       if (user->service_ctx->log_initialized && user->log_prefix != NULL)
                i_set_failure_prefix("%s", user->log_prefix);
 }
 
 static void
 mail_storage_service_io_deactivate_user_cb(struct mail_storage_service_user *user)
 {
-       if (user->log_prefix != NULL)
+       if (user->service_ctx->log_initialized && user->log_prefix != NULL)
                i_set_failure_prefix("%s", user->service_ctx->default_log_prefix);
 }