diff --git a/src/remote/remote.h b/src/remote/remote.h index 22cc61c377c..e0a08f69620 100644 --- a/src/remote/remote.h +++ b/src/remote/remote.h @@ -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()) { } diff --git a/src/yvalve/PluginManager.cpp b/src/yvalve/PluginManager.cpp index 7516b9b613d..f1f25c7943f 100644 --- a/src/yvalve/PluginManager.cpp +++ b/src/yvalve/PluginManager.cpp @@ -905,16 +905,26 @@ namespace currentPlugin = NULL; } - // Avoid concurrent load of the same module - static Static 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 loadModuleMutex; + MutexLockGuard lmGuard(*(&loadModuleMutex), FB_FUNCTION); + + MutexLockGuard g(plugins->mutex, FB_FUNCTION); + if (plugins->get(MapKey(interfaceType, currentName), tmp)) { currentPlugin = tmp;