X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/25f2c3fa03f0729e4f06fbabbb380f4e2ec25e7d..41a0ee6544be0e947c6062a966a93310b9ea5ce5:/projects/stargazer/plugin_runner.cpp?ds=inline diff --git a/projects/stargazer/plugin_runner.cpp b/projects/stargazer/plugin_runner.cpp index eaf51058..56fe5d15 100644 --- a/projects/stargazer/plugin_runner.cpp +++ b/projects/stargazer/plugin_runner.cpp @@ -16,7 +16,7 @@ /* * Author : Boris Mikhailenko - * Author : Maxim Mamontov + * Author : Maksym Mamontov */ #include "plugin_runner.h" @@ -28,6 +28,7 @@ //----------------------------------------------------------------------------- PLUGIN_RUNNER::PLUGIN_RUNNER(const std::string & fileName, + const std::string & name, const MODULE_SETTINGS & ms, ADMINS & admins, TARIFFS & tariffs, @@ -38,6 +39,7 @@ PLUGIN_RUNNER::PLUGIN_RUNNER(const std::string & fileName, STORE & store, const SETTINGS & settings) : pluginFileName(fileName), + pluginName(name), libHandle(NULL), m_plugin(Load(ms, admins, tariffs, users, services, corporations, traffcounter, store, settings)) @@ -46,6 +48,7 @@ PLUGIN_RUNNER::PLUGIN_RUNNER(const std::string & fileName, //----------------------------------------------------------------------------- PLUGIN_RUNNER::~PLUGIN_RUNNER() { +delete &m_plugin; if (dlclose(libHandle)) { errorStr = "Failed to unload plugin '" + pluginFileName + "': " + dlerror(); @@ -67,9 +70,9 @@ errorStr = m_plugin.GetStrError(); return res; } //----------------------------------------------------------------------------- -int PLUGIN_RUNNER::Reload() +int PLUGIN_RUNNER::Reload(const MODULE_SETTINGS & ms) { -int res = m_plugin.Reload(); +int res = m_plugin.Reload(ms); errorStr = m_plugin.GetStrError(); return res; }