diff options
-rw-r--r-- | source/WebAdmin.cpp | 25 | ||||
-rw-r--r-- | source/WebAdmin.h | 9 |
2 files changed, 2 insertions, 32 deletions
diff --git a/source/WebAdmin.cpp b/source/WebAdmin.cpp index 44ba38c8d..378a5966c 100644 --- a/source/WebAdmin.cpp +++ b/source/WebAdmin.cpp @@ -50,32 +50,11 @@ public: -cWebAdmin * WebAdmin = NULL; - - - - - cWebAdmin::cWebAdmin(void) : m_IsInitialized(false), m_TemplateScript("<webadmin_template>"), m_IniFile("webadmin.ini") { - WebAdmin = this; - m_Event = new cEvent(); -} - - - - - -cWebAdmin::~cWebAdmin() -{ - - WebAdmin = 0; - - m_Event->Wait(); - delete m_Event; } @@ -221,7 +200,7 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque // Try to get the template from the Lua template script if (ShouldWrapInTemplate) { - if (WebAdmin->m_TemplateScript.Call("ShowPage", WebAdmin, &TemplateRequest, cLuaState::Return, Template)) + if (m_TemplateScript.Call("ShowPage", this, &TemplateRequest, cLuaState::Return, Template)) { cHTTPResponse Resp; Resp.SetContentType("text/html"); @@ -326,7 +305,7 @@ sWebAdminPage cWebAdmin::GetPage(const HTTPRequest & a_Request) AString FoundPlugin; if (Split.size() > 1) { - for (PluginList::iterator itr = WebAdmin->m_Plugins.begin(); itr != WebAdmin->m_Plugins.end(); ++itr) + for (PluginList::iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr) { if ((*itr)->GetWebTitle() == Split[1]) { diff --git a/source/WebAdmin.h b/source/WebAdmin.h index b85d8d059..271f819d6 100644 --- a/source/WebAdmin.h +++ b/source/WebAdmin.h @@ -100,7 +100,6 @@ public: cWebAdmin(void); - ~cWebAdmin(); /// Initializes the object. Returns true if successfully initialized and ready to start bool Init(void); @@ -171,8 +170,6 @@ protected: PluginList m_Plugins; - cEvent * m_Event; - /// The Lua template script to provide templates: cLuaState m_TemplateScript; @@ -180,12 +177,6 @@ protected: cHTTPServer m_HTTPServer; - #ifdef _WIN32 - static DWORD WINAPI ListenThread(LPVOID lpParam); - #else - static void * ListenThread(void * lpParam); - #endif - AString GetTemplate(void); /// Handles requests coming to the "/webadmin" or "/~webadmin" URLs |