Skip to content

Commit

Permalink
Fixed for ST_COMPONENT_MODE with a proxy (#450)
Browse files Browse the repository at this point in the history
* Fixed for ST_COMPONENT_MODE with a proxy

* fixed misalignment
  • Loading branch information
brnaba-aws authored Feb 15, 2024
1 parent e3c0841 commit cf76107
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions source/config/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,12 @@ bool PlainConfig::LoadFromCliArgs(const CliArgs &cliArgs)
thingName = cliArgs.at(PlainConfig::CLI_THING_NAME).c_str();
}

bool loadFeatureCliArgs = tunneling.LoadFromCliArgs(cliArgs) && logConfig.LoadFromCliArgs(cliArgs);
bool loadFeatureCliArgs = tunneling.LoadFromCliArgs(cliArgs) && logConfig.LoadFromCliArgs(cliArgs) && httpProxyConfig.LoadFromCliArgs(cliArgs);
#if !defined(DISABLE_MQTT)
loadFeatureCliArgs = loadFeatureCliArgs && jobs.LoadFromCliArgs(cliArgs) &&
deviceDefender.LoadFromCliArgs(cliArgs) && fleetProvisioning.LoadFromCliArgs(cliArgs) &&
pubSub.LoadFromCliArgs(cliArgs) && sampleShadow.LoadFromCliArgs(cliArgs) &&
configShadow.LoadFromCliArgs(cliArgs) && secureElement.LoadFromCliArgs(cliArgs) &&
httpProxyConfig.LoadFromCliArgs(cliArgs);
configShadow.LoadFromCliArgs(cliArgs) && secureElement.LoadFromCliArgs(cliArgs);
#endif
return loadFeatureCliArgs;
}
Expand Down Expand Up @@ -2686,7 +2685,6 @@ bool Config::init(const CliArgs &cliArgs)
}
#endif

#if !defined(DISABLE_MQTT)
// ST_COMPONENT_MODE does not require any settings besides those for Secure Tunneling
if (ParseConfigFile(config.httpProxyConfig.proxyConfigPath->c_str(), HTTP_PROXY_CONFIG) &&
config.httpProxyConfig.httpProxyEnabled)
Expand All @@ -2706,7 +2704,6 @@ bool Config::init(const CliArgs &cliArgs)
config.httpProxyConfig.proxyConfigPath->c_str());
return true;
}
#endif

return config.Validate();
}
Expand Down Expand Up @@ -3162,4 +3159,4 @@ string Config::ExpandDefaultConfigDir(bool removeTrailingSeparator)
return Util::TrimRightCopy(expandedConfigDir, string{Config::PATH_DIRECTORY_SEPARATOR});
}
return expandedConfigDir;
}
}

0 comments on commit cf76107

Please sign in to comment.