From c16d820b88ec63ce35c193ad32cfe728918d9d08 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 24 Apr 2024 19:12:46 +0400 Subject: [PATCH] Move OpenSSL probing before crash reporter. --- Telegram/SourceFiles/core/application.cpp | 4 ---- Telegram/SourceFiles/core/launcher.cpp | 2 ++ Telegram/SourceFiles/core/utils.cpp | 2 -- Telegram/SourceFiles/platform/linux/specific_linux.cpp | 3 --- Telegram/SourceFiles/platform/mac/specific_mac.h | 3 --- Telegram/SourceFiles/platform/win/specific_win.h | 3 --- 6 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp index fadb5c49d..0e67e7179 100644 --- a/Telegram/SourceFiles/core/application.cpp +++ b/Telegram/SourceFiles/core/application.cpp @@ -243,14 +243,10 @@ Application::~Application() { Media::Player::finish(_audio.get()); style::stopManager(); - ThirdParty::finish(); - Instance = nullptr; } void Application::run() { - ThirdParty::start(); - // Depends on OpenSSL on macOS, so on ThirdParty::start(). // Depends on notifications settings. _notifications = std::make_unique(); diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index 2765fe3ed..0b6afb7aa 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -385,6 +385,7 @@ int Launcher::exec() { // Must be started before Sandbox is created. Platform::start(); + ThirdParty::start(); auto result = executeApplication(); DEBUG_LOG(("Telegram finished, result: %1").arg(result)); @@ -400,6 +401,7 @@ int Launcher::exec() { } CrashReports::Finish(); + ThirdParty::finish(); Platform::finish(); Logs::finish(); diff --git a/Telegram/SourceFiles/core/utils.cpp b/Telegram/SourceFiles/core/utils.cpp index c82c7ed65..c4d0b76fa 100644 --- a/Telegram/SourceFiles/core/utils.cpp +++ b/Telegram/SourceFiles/core/utils.cpp @@ -92,8 +92,6 @@ namespace ThirdParty { FIPS_mode_set(0); #endif CONF_modules_unload(1); - - Platform::ThirdParty::finish(); } } diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 48c189ca2..c874ae71d 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -755,9 +755,6 @@ namespace ThirdParty { void start() { } -void finish() { -} - } // namespace ThirdParty } // namespace Platform diff --git a/Telegram/SourceFiles/platform/mac/specific_mac.h b/Telegram/SourceFiles/platform/mac/specific_mac.h index 187ceb7b1..013a59370 100644 --- a/Telegram/SourceFiles/platform/mac/specific_mac.h +++ b/Telegram/SourceFiles/platform/mac/specific_mac.h @@ -53,9 +53,6 @@ namespace ThirdParty { inline void start() { } -inline void finish() { -} - } // namespace ThirdParty } // namespace Platform diff --git a/Telegram/SourceFiles/platform/win/specific_win.h b/Telegram/SourceFiles/platform/win/specific_win.h index 56f73a1b4..cea6ec176 100644 --- a/Telegram/SourceFiles/platform/win/specific_win.h +++ b/Telegram/SourceFiles/platform/win/specific_win.h @@ -55,9 +55,6 @@ namespace ThirdParty { void start(); -inline void finish() { -} - } // namespace ThirdParty } // namespace Platform