]> git.stg.codes - stg.git/blobdiff - projects/sgauthstress/store_loader.cpp
Fixed stupid bug in case conversion functions.
[stg.git] / projects / sgauthstress / store_loader.cpp
index c54bdb361cc2e0b0dfb9884ce1f080dcfa873fc3..a545da35e10cf5d76b3daea66dcabc261fcb68b1 100644 (file)
 #include <dlfcn.h>
 
 #include "stg/common.h"
 #include <dlfcn.h>
 
 #include "stg/common.h"
+#include "stg/module_settings.h"
 #include "stg/store.h"
 #include "store_loader.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(),
     : 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()
 {
 
 bool STORE_LOADER::Unload()
 {
-printfd(__FILE__, "STORE_LOADER::Unload()\n");
 if (!isLoaded)
     {
     return true;
     }
 
 if (!isLoaded)
     {
     return true;
     }
 
+printfd(__FILE__, "STORE_LOADER::Unload()\n");
+
 if (dlclose(handle))
     {
     errorStr = "Failed to unload plugin '";
 if (dlclose(handle))
     {
     errorStr = "Failed to unload plugin '";