diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-30 21:14:39 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-30 21:14:39 +0100 |
commit | 0ec31b4aa4c661e090c03aac6fff44a1220bc766 (patch) | |
tree | 6d3e523958edef516e29464c3e5c8d744853fa6a /src/Listen.cxx | |
parent | a943f4063ca82ad348e53492fbf18df09f37952b (diff) |
Listen: eliminate listen_add_config_param()
Diffstat (limited to 'src/Listen.cxx')
-rw-r--r-- | src/Listen.cxx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/Listen.cxx b/src/Listen.cxx index 3b1893b4f..4d7b4f9e9 100644 --- a/src/Listen.cxx +++ b/src/Listen.cxx @@ -40,19 +40,6 @@ int listen_port; -/** - * Throws #std::runtime_error on error. - */ -static void -listen_add_config_param(ClientListener &listener, - unsigned int port, - const ConfigParam *param) -{ - assert(param != nullptr); - - ServerSocketAddGeneric(listener, param->value.c_str(), port); -} - #ifdef ENABLE_SYSTEMD_DAEMON static bool @@ -86,7 +73,8 @@ listen_global_init(const ConfigData &config, ClientListener &listener) for (const auto ¶m : config.GetParamList(ConfigOption::BIND_TO_ADDRESS)) { try { - listen_add_config_param(listener, port, ¶m); + ServerSocketAddGeneric(listener, param.value.c_str(), + port); } catch (...) { std::throw_with_nested(FormatRuntimeError("Failed to listen on %s (line %i)", param.value.c_str(), |