mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
[NetDb] check PersistProfiles on load
* tabulation fixes
This commit is contained in:
parent
d40a029dae
commit
d8a4954bf1
|
@ -319,6 +319,9 @@ namespace data
|
|||
|
||||
std::shared_ptr<RouterProfile> NetDb::FindRouterProfile (const IdentHash& ident) const
|
||||
{
|
||||
if (!m_PersistProfiles)
|
||||
return nullptr;
|
||||
|
||||
auto router = FindRouter (ident);
|
||||
return router ? router->GetProfile () : nullptr;
|
||||
}
|
||||
|
@ -418,7 +421,8 @@ namespace data
|
|||
|
||||
void NetDb::VisitStoredRouterInfos(RouterInfoVisitor v)
|
||||
{
|
||||
m_Storage.Iterate([v] (const std::string & filename) {
|
||||
m_Storage.Iterate([v] (const std::string & filename)
|
||||
{
|
||||
auto ri = std::make_shared<i2p::data::RouterInfo>(filename);
|
||||
v(ri);
|
||||
});
|
||||
|
@ -555,7 +559,7 @@ namespace data
|
|||
++it;
|
||||
}
|
||||
}
|
||||
// clean up expired floodfiils
|
||||
// clean up expired floodfills
|
||||
{
|
||||
std::unique_lock<std::mutex> l(m_FloodfillsMutex);
|
||||
for (auto it = m_Floodfills.begin (); it != m_Floodfills.end ();)
|
||||
|
|
Loading…
Reference in a new issue