mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 07:23:04 +01:00
Do not use as GlobalPtr class with ctor which needs context pool (i.e. TLS object)
This commit is contained in:
parent
5780811da4
commit
808271e1bf
@ -93,8 +93,8 @@ namespace
|
|||||||
class StaticConfHolder
|
class StaticConfHolder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit StaticConfHolder(MemoryPool&)
|
explicit StaticConfHolder(MemoryPool& p)
|
||||||
: confFile(FB_NEW(*getDefaultMemoryPool()) ConfigFile(*getDefaultMemoryPool(),
|
: confFile(FB_NEW(p) ConfigFile(p,
|
||||||
fb_utils::getPrefix(fb_utils::FB_DIR_CONF, "plugins.conf"), ConfigFile::HAS_SUB_CONF))
|
fb_utils::getPrefix(fb_utils::FB_DIR_CONF, "plugins.conf"), ConfigFile::HAS_SUB_CONF))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -107,11 +107,11 @@ namespace
|
|||||||
private:
|
private:
|
||||||
RefPtr<ConfigFile> confFile;
|
RefPtr<ConfigFile> confFile;
|
||||||
};
|
};
|
||||||
GlobalPtr<StaticConfHolder> pluginsConf;
|
InitInstance<StaticConfHolder> pluginsConf;
|
||||||
|
|
||||||
RefPtr<ConfigFile> findConfig(const char* param, const char* pluginName)
|
RefPtr<ConfigFile> findConfig(const char* param, const char* pluginName)
|
||||||
{
|
{
|
||||||
ConfigFile* f = pluginsConf->get();
|
ConfigFile* f = pluginsConf().get();
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
const ConfigFile::Parameter* plugPar = f->findParameter(param, pluginName);
|
const ConfigFile::Parameter* plugPar = f->findParameter(param, pluginName);
|
||||||
|
Loading…
Reference in New Issue
Block a user