if (numberOfStoredSessions < 0) {
errlog("Invalid value '%d' for %s() parameter 'numberOfStoredSessions', should be >= 0, dismissing", numberOfStoredSessions, context);
g_outputBuffer = "Invalid value '" + std::to_string(numberOfStoredSessions) + "' for " + context + "() parameter 'numberOfStoredSessions', should be >= 0, dimissing";
- } else {
+ }
+ else {
config.d_maxStoredSessions = numberOfStoredSessions;
}
}
}
}
- std::string valueStr;
+ std::string valueStr;
if (getOptionalValue<std::string>(vars, "sockets", valueStr) > 0) {
config.d_numberOfSockets = std::stoul(valueStr);
if (config.d_numberOfSockets == 0) {
getOptionalValue<bool>(vars, "lazyHealthCheckUseExponentialBackOff", config.d_lazyHealthCheckUseExponentialBackOff);
-
if (getOptionalValue<std::string>(vars, "lazyHealthCheckMaxBackOff", valueStr) > 0) {
const auto& value = std::stoi(valueStr);
checkParameterBound("lazyHealthCheckMaxBackOff", value);
if (getOptionalValue<std::string>(vars, "addXPF", valueStr) > 0) {
try {
config.xpfRRCode = std::stoi(valueStr);
- } catch (std::exception& e) {
+ }
+ catch (const std::exception& e) {
warnlog("addXPF must be integer, not '%s' - ignoring", valueStr);
}
}
if (getOptionalValue<std::string>(vars, "maxCheckFailures", valueStr) > 0) {
try {
config.maxCheckFailures = std::stoi(valueStr);
- } catch (std::exception& e) {
+ }
+ catch (const std::exception& e) {
warnlog("maxCheckFailures must be integer, not '%s' - ignoring", valueStr);
}
}
if (getOptionalValue<std::string>(vars, "rise", valueStr) > 0) {
try {
config.minRiseSuccesses = std::stoi(valueStr);
- } catch (std::exception& e) {
+ }
+ catch (const std::exception& e) {
warnlog("rise must be integer, not '%s' - ignoring", valueStr);
}
}
LuaAssociativeTable<std::string> customResponseHeaders;
if (getOptionalValue<decltype(customResponseHeaders)>(vars, "customResponseHeaders", customResponseHeaders) > 0) {
for (auto const& headerMap : customResponseHeaders) {
- std::pair<std::string,std::string> headerResponse = std::make_pair(boost::to_lower_copy(headerMap.first), headerMap.second);
+ std::pair<std::string, std::string> headerResponse = std::make_pair(boost::to_lower_copy(headerMap.first), headerMap.second);
frontend->d_customResponseHeaders.insert(headerResponse);
}
}