From 4c9b713c4eae1575e152eade8539e49ccce145a4 Mon Sep 17 00:00:00 2001 From: Vladislav Ostapov Date: Wed, 17 Sep 2025 14:26:09 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=B0=20SCPC=20=D0=B8=20=D0=A8=D0=9F=D0=A1=20=D0=BC?= =?UTF-8?q?=D0=BE=D0=B4=D0=B5=D0=BC=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api-driver/structs.cpp | 6 +++--- src/terminal_api_driver.cpp | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/api-driver/structs.cpp b/src/api-driver/structs.cpp index c3925f5..c029bb9 100644 --- a/src/api-driver/structs.cpp +++ b/src/api-driver/structs.cpp @@ -970,7 +970,7 @@ nlohmann::json api_driver::obj::TerminalRxTxSettings::asJson() const { api_driver::obj::TerminalRxTxSettings::~TerminalRxTxSettings() = default; - +#ifdef API_OBJECT_MANAGER_LOGS_ENABLE // Вспомогательная функция для получения отсортированного списка файлов логов std::vector getLogFilesSorted(const std::string& path) { std::vector files; @@ -994,6 +994,7 @@ std::vector getLogFilesSorted(const std::string& path) { return files; } + api_driver::obj::TerminalManagerLogs::TerminalManagerLogs(const std::string& path): logsFileDir(path) {} std::string api_driver::obj::TerminalManagerLogs::loadPreview() { @@ -1061,8 +1062,7 @@ void api_driver::obj::TerminalManagerLogs::loadFullLog(std::vector& destDa } api_driver::obj::TerminalManagerLogs::~TerminalManagerLogs() = default; - - +#endif // API_OBJECT_MANAGER_LOGS_ENABLE diff --git a/src/terminal_api_driver.cpp b/src/terminal_api_driver.cpp index 3dfa2c9..d5e72d3 100644 --- a/src/terminal_api_driver.cpp +++ b/src/terminal_api_driver.cpp @@ -15,8 +15,11 @@ typedef boost::property_tree::ptree::path_type json_path; - +#ifdef API_OBJECT_MANAGER_LOGS_ENABLE api_driver::ApiDriver::ApiDriver(): logs(MANAGER_LOGS_DIR) {}; +#else +api_driver::ApiDriver::ApiDriver() {}; +#endif void api_driver::ApiDriver::startDaemon() { if (daemon == nullptr) {