X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7a86e28eea13406bbe23e5a3da29aa763cdab67a..c0e423f3a00da01cdcc994e973d0f04c7c956bae:/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 '";