From 0c7d80095b0ca5e3249326e2afc0187cdc888c04 Mon Sep 17 00:00:00 2001 From: Harsh Gandhi Date: Tue, 7 Nov 2023 13:20:34 -0800 Subject: [PATCH] disabled jobs and secure tunneling if they are not compiled into binary --- 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 +}