summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/modules.cpp6
-rw-r--r--core/modules.h9
2 files changed, 11 insertions, 4 deletions
diff --git a/core/modules.cpp b/core/modules.cpp
index 8df3288..6518825 100644
--- a/core/modules.cpp
+++ b/core/modules.cpp
@@ -20,16 +20,16 @@ void load_modules()
++i;
continue;
}
- if(!boost::filesystem::status_known((*i).status()))
+ if(!boost::filesystem::status_known((*i).status())) //worng data
{
++i;
continue;
}
bool is_plugin = true;
plugin::exported_functions_s *funcs = new plugin::exported_functions_s;
- memset(&funcs,0,sizeof(plugin::exported_functions_s));
ACE_DLL *dll = new ACE_DLL;
- if(dll->open((*i).path().string().c_str()) != -1)
+ boost::filesystem::path pth = i->path();
+ if(dll->open(pth.string().c_str()) != -1)
{
if((funcs->Load = (load)dll->symbol("load")) == NULL)
is_plugin = false;
diff --git a/core/modules.h b/core/modules.h
index 5ba7a11..2e843a4 100644
--- a/core/modules.h
+++ b/core/modules.h
@@ -14,7 +14,14 @@ public:
load Load;
on_modules_loaded OnModulesLoaded;
unload Unload;
- set_plugin_info SetPluginInfo;
+ set_plugin_info SetPluginInfo;
+ exported_functions_s()
+ {
+ Load =NULL;
+ OnModulesLoaded = NULL;
+ Unload = NULL;
+ SetPluginInfo = NULL;
+ }
};
ACE_DLL *get_plugin();
void set_plugin();