From 928abf7094753030c931e122f0ea0110abc0793a Mon Sep 17 00:00:00 2001 From: hagen Date: Thu, 21 Jan 2016 07:46:17 +0000 Subject: [PATCH] - I2PControlService::LoadConfig : not used anymore --- I2PControl.cpp | 28 +--------------------------- I2PControl.h | 4 ---- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/I2PControl.cpp b/I2PControl.cpp index 39817e92..062f02ff 100644 --- a/I2PControl.cpp +++ b/I2PControl.cpp @@ -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) diff --git a/I2PControl.h b/I2PControl.h index bed84666..9d97b267 100644 --- a/I2PControl.h +++ b/I2PControl.h @@ -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 socket); @@ -99,7 +96,6 @@ namespace client boost::filesystem::path GetPath () const { return i2p::util::filesystem::GetDefaultDataDir() / I2P_CONTROL_PATH; }; void CreateCertificate (); - private: