diff --git a/src/output/plugins/httpd/HttpdInternal.hxx b/src/output/plugins/httpd/HttpdInternal.hxx index 178ff6df0..f2458589e 100644 --- a/src/output/plugins/httpd/HttpdInternal.hxx +++ b/src/output/plugins/httpd/HttpdInternal.hxx @@ -121,15 +121,17 @@ private: /** * The configured name. */ - char const *name; + char const *const name; + /** * The configured genre. */ - char const *genre; + char const *const genre; + /** * The configured website address. */ - char const *website; + char const *const website; private: /** @@ -147,7 +149,7 @@ private: /** * The maximum number of clients connected at the same time. */ - unsigned clients_max; + const unsigned clients_max; public: HttpdOutput(EventLoop &_loop, const ConfigBlock &block); diff --git a/src/output/plugins/httpd/HttpdOutputPlugin.cxx b/src/output/plugins/httpd/HttpdOutputPlugin.cxx index 2f79e01a0..e8d2d04f0 100644 --- a/src/output/plugins/httpd/HttpdOutputPlugin.cxx +++ b/src/output/plugins/httpd/HttpdOutputPlugin.cxx @@ -43,15 +43,12 @@ HttpdOutput::HttpdOutput(EventLoop &_loop, const ConfigBlock &block) :AudioOutput(FLAG_ENABLE_DISABLE|FLAG_PAUSE), ServerSocket(_loop), prepared_encoder(CreateConfiguredEncoder(block)), - defer_broadcast(_loop, BIND_THIS_METHOD(OnDeferredBroadcast)) + defer_broadcast(_loop, BIND_THIS_METHOD(OnDeferredBroadcast)), + name(block.GetBlockValue("name", "Set name in config")), + genre(block.GetBlockValue("genre", "Set genre in config")), + website(block.GetBlockValue("website", "Set website in config")), + clients_max(block.GetBlockValue("max_clients", 0U)) { - /* read configuration */ - name = block.GetBlockValue("name", "Set name in config"); - genre = block.GetBlockValue("genre", "Set genre in config"); - website = block.GetBlockValue("website", "Set website in config"); - - clients_max = block.GetBlockValue("max_clients", 0U); - /* set up bind_to_address */ ServerSocketAddGeneric(*this, block.GetBlockValue("bind_to_address"), block.GetBlockValue("port", 8000U));