mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
- I2PControlService::LoadConfig : not used anymore
This commit is contained in:
parent
2cace0008e
commit
928abf7094
@ -35,7 +35,7 @@ namespace client
|
||||
m_ShutdownTimer (m_Service)
|
||||
{
|
||||
GetOption("i2pcontrol.password", m_Password);
|
||||
LoadConfig ();
|
||||
|
||||
// certificate
|
||||
auto path = GetPath ();
|
||||
if (!boost::filesystem::exists (path))
|
||||
@ -87,32 +87,6 @@ namespace client
|
||||
Stop ();
|
||||
}
|
||||
|
||||
void I2PControlService::LoadConfig ()
|
||||
{
|
||||
auto path = GetPath ();
|
||||
if (!boost::filesystem::exists (path))
|
||||
{
|
||||
if (!boost::filesystem::create_directory (path))
|
||||
LogPrint (eLogError, "Failed to create i2pcontrol directory");
|
||||
}
|
||||
boost::property_tree::ptree pt;
|
||||
auto filename = path / I2P_CONTROL_CONFIG_FILE;
|
||||
bool isNew = true;
|
||||
if (boost::filesystem::exists (filename))
|
||||
{
|
||||
try
|
||||
{
|
||||
boost::property_tree::read_ini (filename.string (), pt);
|
||||
isNew = false;
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
LogPrint (eLogError, "Can't read ", filename, ": ", ex.what ());
|
||||
}
|
||||
}
|
||||
GetOption("i2pcontrol.password", m_Password);
|
||||
}
|
||||
|
||||
void I2PControlService::Start ()
|
||||
{
|
||||
if (!m_IsRunning)
|
||||
|
@ -81,9 +81,6 @@ namespace client
|
||||
|
||||
private:
|
||||
|
||||
void LoadConfig ();
|
||||
void SaveConfig ();
|
||||
|
||||
void Run ();
|
||||
void Accept ();
|
||||
void HandleAccept(const boost::system::error_code& ecode, std::shared_ptr<ssl_socket> socket);
|
||||
@ -99,7 +96,6 @@ namespace client
|
||||
|
||||
boost::filesystem::path GetPath () const { return i2p::util::filesystem::GetDefaultDataDir() / I2P_CONTROL_PATH; };
|
||||
void CreateCertificate ();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user