Removed remnants of the old webserver.
parent
e52dae2c51
commit
fe582b69d5
|
@ -50,32 +50,11 @@ public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cWebAdmin * WebAdmin = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cWebAdmin::cWebAdmin(void) :
|
cWebAdmin::cWebAdmin(void) :
|
||||||
m_IsInitialized(false),
|
m_IsInitialized(false),
|
||||||
m_TemplateScript("<webadmin_template>"),
|
m_TemplateScript("<webadmin_template>"),
|
||||||
m_IniFile("webadmin.ini")
|
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
|
// Try to get the template from the Lua template script
|
||||||
if (ShouldWrapInTemplate)
|
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;
|
cHTTPResponse Resp;
|
||||||
Resp.SetContentType("text/html");
|
Resp.SetContentType("text/html");
|
||||||
|
@ -326,7 +305,7 @@ sWebAdminPage cWebAdmin::GetPage(const HTTPRequest & a_Request)
|
||||||
AString FoundPlugin;
|
AString FoundPlugin;
|
||||||
if (Split.size() > 1)
|
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])
|
if ((*itr)->GetWebTitle() == Split[1])
|
||||||
{
|
{
|
||||||
|
|
|
@ -100,7 +100,6 @@ public:
|
||||||
|
|
||||||
|
|
||||||
cWebAdmin(void);
|
cWebAdmin(void);
|
||||||
~cWebAdmin();
|
|
||||||
|
|
||||||
/// Initializes the object. Returns true if successfully initialized and ready to start
|
/// Initializes the object. Returns true if successfully initialized and ready to start
|
||||||
bool Init(void);
|
bool Init(void);
|
||||||
|
@ -171,8 +170,6 @@ protected:
|
||||||
|
|
||||||
PluginList m_Plugins;
|
PluginList m_Plugins;
|
||||||
|
|
||||||
cEvent * m_Event;
|
|
||||||
|
|
||||||
/// The Lua template script to provide templates:
|
/// The Lua template script to provide templates:
|
||||||
cLuaState m_TemplateScript;
|
cLuaState m_TemplateScript;
|
||||||
|
|
||||||
|
@ -180,12 +177,6 @@ protected:
|
||||||
cHTTPServer m_HTTPServer;
|
cHTTPServer m_HTTPServer;
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
static DWORD WINAPI ListenThread(LPVOID lpParam);
|
|
||||||
#else
|
|
||||||
static void * ListenThread(void * lpParam);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AString GetTemplate(void);
|
AString GetTemplate(void);
|
||||||
|
|
||||||
/// Handles requests coming to the "/webadmin" or "/~webadmin" URLs
|
/// Handles requests coming to the "/webadmin" or "/~webadmin" URLs
|
||||||
|
|
Loading…
Reference in New Issue