]> git.stg.codes - stg.git/blobdiff - projects/sgauthstress/store_loader.cpp
Fix email.
[stg.git] / projects / sgauthstress / store_loader.cpp
index c54bdb361cc2e0b0dfb9884ce1f080dcfa873fc3..0c1db38ad17b1724f986607ca13b113708c67235 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 /*
- *    Author : Maxim Mamontov <faust@stargazer.dp.ua>
+ *    Author : Maksym Mamontov <stg@madf.info>
  */
 
 /*
 #include <dlfcn.h>
 
 #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 '";