aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Configured.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/Configured.cxx')
-rw-r--r--src/db/Configured.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/db/Configured.cxx b/src/db/Configured.cxx
index 5d53e5951..9ada7f34a 100644
--- a/src/db/Configured.cxx
+++ b/src/db/Configured.cxx
@@ -22,6 +22,7 @@
#include "DatabaseGlue.hxx"
#include "config/ConfigGlobal.hxx"
#include "config/Param.hxx"
+#include "config/Block.hxx"
#include "config/ConfigError.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/StandardDirectory.hxx"
@@ -32,7 +33,7 @@ Database *
CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
Error &error)
{
- const auto *param = config_get_param(ConfigOption::DATABASE);
+ const auto *param = config_get_block(ConfigBlockOption::DATABASE);
const auto *path = config_get_param(ConfigOption::DB_FILE);
if (param != nullptr && path != nullptr) {
@@ -42,10 +43,10 @@ CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
return nullptr;
}
- struct config_param *allocated = nullptr;
+ ConfigBlock *allocated = nullptr;
if (param == nullptr && path != nullptr) {
- allocated = new config_param("database", path->line);
+ allocated = new ConfigBlock(path->line);
allocated->AddBlockParam("path", path->value.c_str(),
path->line);
param = allocated;
@@ -60,7 +61,7 @@ CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
const auto db_file = AllocatedPath::Build(cache_dir, "mpd.db");
- allocated = new config_param("database");
+ allocated = new ConfigBlock();
allocated->AddBlockParam("path", db_file.c_str(), -1);
param = allocated;
}