mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
specify and check netId
This commit is contained in:
parent
2a4d78d9bf
commit
0ca3fb5af0
4 changed files with 20 additions and 9 deletions
19
NetDb.cpp
19
NetDb.cpp
|
@ -168,16 +168,19 @@ namespace data
|
|||
}
|
||||
else
|
||||
{
|
||||
LogPrint (eLogInfo, "NetDb: RouterInfo added: ", ident.ToBase32());
|
||||
r = std::make_shared<RouterInfo> (buf, len);
|
||||
if (!r->IsUnreachable ())
|
||||
{
|
||||
std::unique_lock<std::mutex> l(m_RouterInfosMutex);
|
||||
m_RouterInfos[r->GetIdentHash ()] = r;
|
||||
}
|
||||
if (r->IsFloodfill ())
|
||||
{
|
||||
std::unique_lock<std::mutex> l(m_FloodfillsMutex);
|
||||
m_Floodfills.push_back (r);
|
||||
LogPrint (eLogInfo, "NetDb: RouterInfo added: ", ident.ToBase32());
|
||||
{
|
||||
std::unique_lock<std::mutex> l(m_RouterInfosMutex);
|
||||
m_RouterInfos[r->GetIdentHash ()] = r;
|
||||
}
|
||||
if (r->IsFloodfill ())
|
||||
{
|
||||
std::unique_lock<std::mutex> l(m_FloodfillsMutex);
|
||||
m_Floodfills.push_back (r);
|
||||
}
|
||||
}
|
||||
}
|
||||
// take care about requested destination
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue