mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
update introducer's iTag is session to introducer was replaced to new one
This commit is contained in:
parent
c3a1631319
commit
64e4b3871a
6 changed files with 48 additions and 13 deletions
|
@ -1554,5 +1554,23 @@ namespace data
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LocalRouterInfo::UpdateSSU2Introducer (const IdentHash& h, bool v4, uint32_t iTag, uint32_t iExp)
|
||||
{
|
||||
auto addresses = GetAddresses ();
|
||||
if (!addresses) return false;
|
||||
auto addr = (*addresses)[v4 ? eSSU2V4Idx : eSSU2V6Idx];
|
||||
if (addr)
|
||||
{
|
||||
for (auto& it: addr->ssu->introducers)
|
||||
if (h == it.iH)
|
||||
{
|
||||
it.iTag = iTag;
|
||||
it.iExp = iExp;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue