mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
initialize context after start-up
This commit is contained in:
parent
ebe73491c6
commit
cba58a5965
|
@ -51,6 +51,7 @@ namespace i2p
|
|||
bool Daemon_Singleton::init(int argc, char* argv[])
|
||||
{
|
||||
i2p::util::config::OptionParser(argc, argv);
|
||||
i2p::context.Init ();
|
||||
|
||||
LogPrint("\n\n\n\ni2pd starting\n");
|
||||
LogPrint("data directory: ", i2p::util::filesystem::GetDataDir().string());
|
||||
|
|
|
@ -13,6 +13,10 @@ namespace i2p
|
|||
|
||||
RouterContext::RouterContext ():
|
||||
m_LastUpdateTime (0)
|
||||
{
|
||||
}
|
||||
|
||||
void RouterContext::Init ()
|
||||
{
|
||||
if (!Load ())
|
||||
CreateNewRouter ();
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace i2p
|
|||
public:
|
||||
|
||||
RouterContext ();
|
||||
void Init ();
|
||||
|
||||
i2p::data::RouterInfo& GetRouterInfo () { return m_RouterInfo; };
|
||||
const uint8_t * GetPrivateKey () const { return m_Keys.GetPrivateKey (); };
|
||||
|
|
Loading…
Reference in a new issue