From b75dc3ac03ee601d30cfff3d7596913a7aca15d9 Mon Sep 17 00:00:00 2001 From: Harsh Gandhi <63674702+HarshGandhi-AWS@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:57:28 -0800 Subject: [PATCH] disabled jobs and secure tunneling if they are not compiled into binary (#436) --- source/config/Config.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/config/Config.cpp b/source/config/Config.cpp index 4d637720f..c010e4161 100644 --- a/source/config/Config.cpp +++ b/source/config/Config.cpp @@ -17,6 +17,7 @@ #endif +#include "../SharedCrtResourceManager.h" #include "../util/FileUtils.h" #include "../util/MqttUtils.h" #include "../util/ProxyUtils.h" @@ -2641,6 +2642,14 @@ bool Config::ParseCliArgs(int argc, char **argv, CliArgs &cliArgs) bool Config::init(const CliArgs &cliArgs) { +#if defined(EXCLUDE_JOBS) + config.jobs.enabled = false; +#endif + +#if defined(EXCLUDE_ST) + config.tunneling.enabled = false; +#endif + try { string filename = Config::DEFAULT_CONFIG_FILE; @@ -3171,4 +3180,4 @@ string Config::ExpandDefaultConfigDir(bool removeTrailingSeparator) return Util::TrimRightCopy(expandedConfigDir, string{Config::PATH_DIRECTORY_SEPARATOR}); } return expandedConfigDir; -} \ No newline at end of file +}