aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/Init.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/Init.cxx')
-rw-r--r--src/input/Init.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/input/Init.cxx b/src/input/Init.cxx
index 0ee87c4d8..4ed44f100 100644
--- a/src/input/Init.cxx
+++ b/src/input/Init.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -24,7 +24,7 @@
#include "util/Error.hxx"
#include "config/ConfigGlobal.hxx"
#include "config/ConfigOption.hxx"
-#include "config/ConfigData.hxx"
+#include "config/Block.hxx"
#include "Log.hxx"
#include <assert.h>
@@ -33,7 +33,7 @@
bool
input_stream_global_init(Error &error)
{
- const config_param empty;
+ const ConfigBlock empty;
for (unsigned i = 0; input_plugins[i] != nullptr; ++i) {
const InputPlugin *plugin = input_plugins[i];
@@ -42,16 +42,17 @@ input_stream_global_init(Error &error)
assert(*plugin->name != 0);
assert(plugin->open != nullptr);
- const struct config_param *param =
- config_find_block(CONF_INPUT, "plugin", plugin->name);
- if (param == nullptr) {
- param = &empty;
- } else if (!param->GetBlockValue("enabled", true))
+ const auto *block =
+ config_find_block(ConfigBlockOption::INPUT, "plugin",
+ plugin->name);
+ if (block == nullptr) {
+ block = &empty;
+ } else if (!block->GetBlockValue("enabled", true))
/* the plugin is disabled in mpd.conf */
continue;
InputPlugin::InitResult result = plugin->init != nullptr
- ? plugin->init(*param, error)
+ ? plugin->init(*block, error)
: InputPlugin::InitResult::SUCCESS;
switch (result) {