1
0

Webadmin: Added default ports to auto-generated ini file.

Fixes #1382.
This commit is contained in:
Mattes D 2014-09-07 19:45:15 +02:00
parent a0feff2734
commit d2c1518145

View File

@ -43,6 +43,8 @@ public:
cWebAdmin::cWebAdmin(void) :
m_IsInitialized(false),
m_IsRunning(false),
m_PortsIPv4("8080"),
m_PortsIPv6(""),
m_TemplateScript("<webadmin_template>")
{
}
@ -89,6 +91,8 @@ bool cWebAdmin::Init(void)
m_IniFile.AddHeaderComment(" Password format: Password=*password*; for example:");
m_IniFile.AddHeaderComment(" [User:admin]");
m_IniFile.AddHeaderComment(" Password=admin");
m_IniFile.SetValue("WebAdmin", "Port", m_PortsIPv4);
m_IniFile.SetValue("WebAdmin", "PortsIPv6", m_PortsIPv6);
m_IniFile.WriteFile("webadmin.ini");
}
@ -100,8 +104,8 @@ bool cWebAdmin::Init(void)
LOGD("Initialising WebAdmin...");
m_PortsIPv4 = m_IniFile.GetValueSet("WebAdmin", "Port", "8080");
m_PortsIPv6 = m_IniFile.GetValueSet("WebAdmin", "PortsIPv6", "");
m_PortsIPv4 = m_IniFile.GetValueSet("WebAdmin", "Port", m_PortsIPv4);
m_PortsIPv6 = m_IniFile.GetValueSet("WebAdmin", "PortsIPv6", m_PortsIPv6);
if (!m_HTTPServer.Initialize(m_PortsIPv4, m_PortsIPv6))
{