config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
This commit is contained in:
@@ -22,17 +22,17 @@
|
||||
#include "Registry.hxx"
|
||||
#include "DatabaseError.hxx"
|
||||
#include "util/Error.hxx"
|
||||
#include "config/Param.hxx"
|
||||
#include "config/Block.hxx"
|
||||
#include "DatabasePlugin.hxx"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
Database *
|
||||
DatabaseGlobalInit(EventLoop &loop, DatabaseListener &listener,
|
||||
const config_param ¶m, Error &error)
|
||||
const ConfigBlock &block, Error &error)
|
||||
{
|
||||
const char *plugin_name =
|
||||
param.GetBlockValue("plugin", "simple");
|
||||
block.GetBlockValue("plugin", "simple");
|
||||
|
||||
const DatabasePlugin *plugin = GetDatabasePluginByName(plugin_name);
|
||||
if (plugin == nullptr) {
|
||||
@@ -41,5 +41,5 @@ DatabaseGlobalInit(EventLoop &loop, DatabaseListener &listener,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return plugin->create(loop, listener, param, error);
|
||||
return plugin->create(loop, listener, block, error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user