Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/remote/remote.h
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ class ClntAuthBlock final :
{
public:
ClientCrypt()
: pluginItr(Firebird::IPluginManager::TYPE_KEY_HOLDER, "NoDefault"),
: pluginItr(Firebird::IPluginManager::TYPE_KEY_HOLDER, ""),
currentIface(nullptr), afterIface(nullptr),
triedPlugins(getPool())
{ }
Expand Down
24 changes: 17 additions & 7 deletions src/yvalve/PluginManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -905,16 +905,26 @@ namespace
currentPlugin = NULL;
}

// Avoid concurrent load of the same module
static Static<Mutex> loadModuleMutex;
MutexLockGuard lmGuard(*(&loadModuleMutex), FB_FUNCTION);

MutexLockGuard g(plugins->mutex, FB_FUNCTION);

while (currentName.getWord(namesList, " \t,;"))
{
// First check - may be currentName is present among already configured plugins
ConfiguredPlugin* tmp = NULL;
{
MutexLockGuard g(plugins->mutex, FB_FUNCTION);

// First check - may be currentName is present among already configured plugins
if (plugins->get(MapKey(interfaceType, currentName), tmp))
{
currentPlugin = tmp;
break;
}
}

// Avoid concurrent load of the same module
static Static<Mutex> loadModuleMutex;
MutexLockGuard lmGuard(*(&loadModuleMutex), FB_FUNCTION);

MutexLockGuard g(plugins->mutex, FB_FUNCTION);

if (plugins->get(MapKey(interfaceType, currentName), tmp))
{
currentPlugin = tmp;
Expand Down
Loading