config/Option: convert to strictly-typed enum
This commit is contained in:
@@ -43,7 +43,8 @@ input_stream_global_init(Error &error)
|
||||
assert(plugin->open != nullptr);
|
||||
|
||||
const struct config_param *param =
|
||||
config_find_block(CONF_INPUT, "plugin", plugin->name);
|
||||
config_find_block(ConfigOption::INPUT, "plugin",
|
||||
plugin->name);
|
||||
if (param == nullptr) {
|
||||
param = ∅
|
||||
} else if (!param->GetBlockValue("enabled", true))
|
||||
|
@@ -564,10 +564,10 @@ input_curl_init(const config_param ¶m, Error &error)
|
||||
|
||||
if (proxy == nullptr) {
|
||||
/* deprecated proxy configuration */
|
||||
proxy = config_get_string(CONF_HTTP_PROXY_HOST, nullptr);
|
||||
proxy_port = config_get_positive(CONF_HTTP_PROXY_PORT, 0);
|
||||
proxy_user = config_get_string(CONF_HTTP_PROXY_USER, nullptr);
|
||||
proxy_password = config_get_string(CONF_HTTP_PROXY_PASSWORD,
|
||||
proxy = config_get_string(ConfigOption::HTTP_PROXY_HOST, nullptr);
|
||||
proxy_port = config_get_positive(ConfigOption::HTTP_PROXY_PORT, 0);
|
||||
proxy_user = config_get_string(ConfigOption::HTTP_PROXY_USER, nullptr);
|
||||
proxy_password = config_get_string(ConfigOption::HTTP_PROXY_PASSWORD,
|
||||
"");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user