From 683c97d5c87b70b67e5f9edeade30db284d69ff7 Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 20 Nov 2014 15:48:28 -0500 Subject: [PATCH] shared pointer for local RI --- RouterContext.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RouterContext.h b/RouterContext.h index aef7d6ac..80928901 100644 --- a/RouterContext.h +++ b/RouterContext.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -24,6 +25,11 @@ namespace i2p void Init (); i2p::data::RouterInfo& GetRouterInfo () { return m_RouterInfo; }; + std::shared_ptr GetSharedRouterInfo () const + { + return std::shared_ptr (&m_RouterInfo, + [](const i2p::data::RouterInfo *) {}); + } CryptoPP::RandomNumberGenerator& GetRandomNumberGenerator () { return m_Rnd; }; void UpdatePort (int port); // called from Daemon