mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
Populate router's buffer before sending RouterInfo block
This commit is contained in:
parent
0c64f278d7
commit
e8c58270c4
3 changed files with 12 additions and 3 deletions
|
@ -977,8 +977,7 @@ namespace data
|
|||
if (router)
|
||||
{
|
||||
LogPrint (eLogDebug, "NetDb: Requested RouterInfo ", key, " found");
|
||||
if (!router->GetBuffer ())
|
||||
router->LoadBuffer (m_Storage.Path (router->GetIdentHashBase64 ()));
|
||||
PopulateRouterInfoBuffer (router);
|
||||
if (router->GetBuffer ())
|
||||
replyMsg = CreateDatabaseStoreMsg (router);
|
||||
}
|
||||
|
@ -1433,5 +1432,11 @@ namespace data
|
|||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
void NetDb::PopulateRouterInfoBuffer (std::shared_ptr<RouterInfo> r)
|
||||
{
|
||||
if (!r || r->GetBuffer ()) return;
|
||||
r->LoadBuffer (m_Storage.Path (r->GetIdentHashBase64 ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue