mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
floodfill parameter
This commit is contained in:
parent
2ed69ef602
commit
7e45233c7d
4 changed files with 26 additions and 5 deletions
|
@ -13,7 +13,8 @@ namespace i2p
|
|||
RouterContext context;
|
||||
|
||||
RouterContext::RouterContext ():
|
||||
m_LastUpdateTime (0), m_IsUnreachable (false), m_AcceptsTunnels (true)
|
||||
m_LastUpdateTime (0), m_IsUnreachable (false), m_AcceptsTunnels (true),
|
||||
m_IsFloodfill (false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -107,6 +108,16 @@ namespace i2p
|
|||
UpdateRouterInfo ();
|
||||
}
|
||||
|
||||
void RouterContext::SetFloodfill (bool floodfill)
|
||||
{
|
||||
m_IsFloodfill = floodfill;
|
||||
if (floodfill)
|
||||
m_RouterInfo.SetCaps (m_RouterInfo.GetCaps () | i2p::data::RouterInfo::eFloodfill);
|
||||
else
|
||||
m_RouterInfo.SetCaps (m_RouterInfo.GetCaps () & ~i2p::data::RouterInfo::eFloodfill);
|
||||
UpdateRouterInfo ();
|
||||
}
|
||||
|
||||
void RouterContext::SetUnreachable ()
|
||||
{
|
||||
m_IsUnreachable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue