diff options
Diffstat (limited to 'src/Listen.cxx')
-rw-r--r-- | src/Listen.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Listen.cxx b/src/Listen.cxx index b74777127..2df05c634 100644 --- a/src/Listen.cxx +++ b/src/Listen.cxx @@ -88,14 +88,13 @@ listen_global_init(const ConfigData &config, ClientListener &listener) return; #endif - for (const auto *param = config.GetParam(ConfigOption::BIND_TO_ADDRESS); - param != nullptr; param = param->next) { + for (const auto ¶m : config.GetParamList(ConfigOption::BIND_TO_ADDRESS)) { try { - listen_add_config_param(listener, port, param); + listen_add_config_param(listener, port, ¶m); } catch (...) { std::throw_with_nested(FormatRuntimeError("Failed to listen on %s (line %i)", - param->value.c_str(), - param->line)); + param.value.c_str(), + param.line)); } } |