X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7a86e28eea13406bbe23e5a3da29aa763cdab67a..03f48bb9a6678946fbcc4ded7a2d26c8f61873b5:/projects/sgauthstress/store_loader.cpp diff --git a/projects/sgauthstress/store_loader.cpp b/projects/sgauthstress/store_loader.cpp index c54bdb36..a545da35 100644 --- a/projects/sgauthstress/store_loader.cpp +++ b/projects/sgauthstress/store_loader.cpp @@ -31,17 +31,18 @@ #include #include "stg/common.h" +#include "stg/module_settings.h" #include "stg/store.h" #include "store_loader.h" -#include "settings_impl.h" -STORE_LOADER::STORE_LOADER(const SETTINGS_IMPL & settings) +STORE_LOADER::STORE_LOADER(const std::string & modulesPath, + const MODULE_SETTINGS & settings) : isLoaded(false), handle(NULL), plugin(NULL), errorStr(), - storeSettings(settings.GetStoreModuleSettings()), - pluginFileName(settings.GetModulesPath() + "/mod_" + storeSettings.moduleName + ".so") + storeSettings(settings), + pluginFileName(modulesPath + "/mod_" + storeSettings.moduleName + ".so") { } @@ -109,12 +110,13 @@ return false; bool STORE_LOADER::Unload() { -printfd(__FILE__, "STORE_LOADER::Unload()\n"); if (!isLoaded) { return true; } +printfd(__FILE__, "STORE_LOADER::Unload()\n"); + if (dlclose(handle)) { errorStr = "Failed to unload plugin '";