mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
* unwrap i2p::util::config::* calls in Daemon.cpp
This commit is contained in:
parent
314e1e4bfe
commit
6740ec464c
17
Daemon.cpp
17
Daemon.cpp
@ -120,8 +120,10 @@ namespace i2p
|
||||
g_Log->SetLogLevel(i2p::util::config::GetArg("-loglevel", "info"));
|
||||
}
|
||||
|
||||
LogPrint(eLogInfo, "Daemon: staring HTTP Server");
|
||||
d.httpServer = std::unique_ptr<i2p::util::HTTPServer>(new i2p::util::HTTPServer(i2p::util::config::GetArg("-httpaddress", "127.0.0.1"), i2p::util::config::GetArg("-httpport", 7070)));
|
||||
std::string httpAddr = i2p::util::config::GetArg("-httpaddress", "127.0.0.1");
|
||||
uint16_t httpPort = i2p::util::config::GetArg("-httpport", 7070);
|
||||
LogPrint(eLogInfo, "Daemon: staring HTTP Server at ", httpAddr, ":", httpPort);
|
||||
d.httpServer = std::unique_ptr<i2p::util::HTTPServer>(new i2p::util::HTTPServer(httpAddr, httpPort));
|
||||
d.httpServer->Start();
|
||||
|
||||
LogPrint(eLogInfo, "Daemon: starting NetDB");
|
||||
@ -140,12 +142,13 @@ namespace i2p
|
||||
LogPrint(eLogInfo, "Daemon: starting Client");
|
||||
i2p::client::context.Start ();
|
||||
|
||||
// I2P Control
|
||||
int i2pcontrolPort = i2p::util::config::GetArg("-i2pcontrolport", 0);
|
||||
if (i2pcontrolPort)
|
||||
// I2P Control Protocol
|
||||
std::string i2pcpAddr = i2p::util::config::GetArg("-i2pcontroladdress", "127.0.0.1");
|
||||
uint16_t i2pcpPort = i2p::util::config::GetArg("-i2pcontrolport", 0);
|
||||
if (i2pcpPort)
|
||||
{
|
||||
LogPrint(eLogInfo, "Daemon: starting I2PControl");
|
||||
d.m_I2PControlService = std::unique_ptr<i2p::client::I2PControlService>(new i2p::client::I2PControlService (i2p::util::config::GetArg("-i2pcontroladdress", "127.0.0.1"), i2pcontrolPort));
|
||||
LogPrint(eLogInfo, "Daemon: starting I2PControl at ", i2pcpAddr, ":", i2pcpPort);
|
||||
d.m_I2PControlService = std::unique_ptr<i2p::client::I2PControlService>(new i2p::client::I2PControlService (i2pcpAddr, i2pcpPort));
|
||||
d.m_I2PControlService->Start ();
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user