From 26d232c567ef808f313ec5086830a6d3c350b078 Mon Sep 17 00:00:00 2001 From: hagen Date: Sun, 24 Jan 2016 11:06:17 +0000 Subject: [PATCH] * Daemon_Singleton::init : unwrap spagetti-code --- Daemon.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Daemon.cpp b/Daemon.cpp index 4b0f7b64..34a90f9a 100644 --- a/Daemon.cpp +++ b/Daemon.cpp @@ -60,17 +60,23 @@ namespace i2p bool Daemon_Singleton::init(int argc, char* argv[]) { + std::string config = i2p::util::filesystem::GetConfigFile().string(); + std::string tunconf = i2p::util::filesystem::GetTunnelsConfigFile().string(); + std::string datadir = i2p::util::filesystem::GetDataDir().string(); + + LogPrint(eLogInfo, "i2pd v", VERSION, " starting"); + LogPrint(eLogDebug, "FS: main config file: ", config); + LogPrint(eLogDebug, "FS: tunnels config: ", tunconf); + LogPrint(eLogDebug, "FS: data directory: ", datadir); + i2p::config::Init(); i2p::config::ParseCmdline(argc, argv); - i2p::config::ParseConfig(i2p::util::filesystem::GetConfigFile().string()); + i2p::config::ParseConfig(config); i2p::config::Finalize(); i2p::crypto::InitCrypto (); i2p::context.Init (); - LogPrint(eLogInfo, "i2pd v", VERSION, " starting"); - LogPrint(eLogDebug, "FS: data directory: ", i2p::util::filesystem::GetDataDir().string()); - i2p::config::GetOption("daemon", isDaemon); i2p::config::GetOption("log", isLogging);