aboutsummaryrefslogtreecommitdiffstats
path: root/src/neighbor/Glue.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/neighbor/Glue.cxx')
-rw-r--r--src/neighbor/Glue.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/neighbor/Glue.cxx b/src/neighbor/Glue.cxx
index fbf25cc8d..4d5d7b4b0 100644
--- a/src/neighbor/Glue.cxx
+++ b/src/neighbor/Glue.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,8 +24,8 @@
#include "NeighborPlugin.hxx"
#include "Info.hxx"
#include "config/ConfigGlobal.hxx"
-#include "config/ConfigData.hxx"
#include "config/ConfigError.hxx"
+#include "config/Block.hxx"
#include "util/Error.hxx"
NeighborGlue::Explorer::~Explorer()
@@ -37,9 +37,9 @@ NeighborGlue::~NeighborGlue() {}
static NeighborExplorer *
CreateNeighborExplorer(EventLoop &loop, NeighborListener &listener,
- const config_param &param, Error &error)
+ const ConfigBlock &block, Error &error)
{
- const char *plugin_name = param.GetBlockValue("plugin");
+ const char *plugin_name = block.GetBlockValue("plugin");
if (plugin_name == nullptr) {
error.Set(config_domain,
"Missing \"plugin\" configuration");
@@ -53,18 +53,18 @@ CreateNeighborExplorer(EventLoop &loop, NeighborListener &listener,
return nullptr;
}
- return plugin->create(loop, listener, param, error);
+ return plugin->create(loop, listener, block, error);
}
bool
NeighborGlue::Init(EventLoop &loop, NeighborListener &listener, Error &error)
{
- for (const config_param *param = config_get_param(CONF_NEIGHBORS);
- param != nullptr; param = param->next) {
+ for (const auto *block = config_get_block(ConfigBlockOption::NEIGHBORS);
+ block != nullptr; block = block->next) {
NeighborExplorer *explorer =
- CreateNeighborExplorer(loop, listener, *param, error);
+ CreateNeighborExplorer(loop, listener, *block, error);
if (explorer == nullptr) {
- error.FormatPrefix("Line %i: ", param->line);
+ error.FormatPrefix("Line %i: ", block->line);
return false;
}