1
0
Fork 0

Removed remnants of the old webserver.

This commit is contained in:
madmaxoft 2013-10-06 14:38:10 +02:00
parent e52dae2c51
commit fe582b69d5
2 changed files with 2 additions and 32 deletions

View File

@ -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])
{

View File

@ -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