X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/af9452155f0892e1d2862efad4a87861ca60867d..611c8051a2ae58a1c306675c8250865e12563834:/stargazer/plugins/other/radius/radius.cpp?ds=sidebyside diff --git a/stargazer/plugins/other/radius/radius.cpp b/stargazer/plugins/other/radius/radius.cpp index ad9135a5..dcfb4e69 100644 --- a/stargazer/plugins/other/radius/radius.cpp +++ b/stargazer/plugins/other/radius/radius.cpp @@ -22,7 +22,7 @@ #include "stg/store.h" #include "stg/users.h" -#include "stg/plugin_creator.h" +#include "stg/user.h" #include "stg/common.h" #include @@ -41,26 +41,19 @@ using STG::Config; using STG::Conn; -namespace +extern "C" STG::Plugin* GetPlugin() { - -PLUGIN_CREATOR creator; - -} - -extern "C" PLUGIN * GetPlugin() -{ - return creator.GetPlugin(); + static RADIUS plugin; + return &plugin; } RADIUS::RADIUS() - : m_config(), - m_running(false), + : m_running(false), m_stopped(true), m_users(NULL), m_store(NULL), m_listenSocket(0), - m_logger(GetPluginLogger(GetStgLogger(), "radius")) + m_logger(STG::PluginLogger::get("radius")) { } @@ -367,7 +360,7 @@ void RADIUS::acceptTCP() m_conns.push_back(new Conn(*m_users, m_logger, *this, m_config, res, remote)); } -void RADIUS::authorize(const USER& user) +void RADIUS::authorize(const STG::User& user) { uint32_t ip = 0; const std::string& login(user.GetLogin());