From: Timo Sirainen Date: Wed, 28 Sep 2022 13:21:26 +0000 (+0300) Subject: lib-storage: Fix MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT to not change log prefix in... X-Git-Tag: 2.3.20~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=069dfd657fd91a0e2a3a9307a0cf499d795f27f2;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Fix MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT to not change log prefix in ioloop context changes This didn't appear to cause any visible bugs with the current code, but is required by the next commit. Broken by ad13ab0702141065b79a1b7e8f2833e5b93871a4 --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index 567ecb8bc3..a5c47b57fe 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -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); }