mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
publish iexp
This commit is contained in:
parent
ac47c9c673
commit
df858d9143
@ -617,6 +617,18 @@ namespace data
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (const auto& introducer: address.ssu->introducers)
|
for (const auto& introducer: address.ssu->introducers)
|
||||||
|
{
|
||||||
|
if (introducer.iExp) // expiration is specified
|
||||||
|
{
|
||||||
|
WriteString ("iexp" + boost::lexical_cast<std::string>(i), properties);
|
||||||
|
properties << '=';
|
||||||
|
WriteString (boost::lexical_cast<std::string>(introducer.iExp), properties);
|
||||||
|
properties << ';';
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
i = 0;
|
||||||
|
for (const auto& introducer: address.ssu->introducers)
|
||||||
{
|
{
|
||||||
WriteString ("ihost" + boost::lexical_cast<std::string>(i), properties);
|
WriteString ("ihost" + boost::lexical_cast<std::string>(i), properties);
|
||||||
properties << '=';
|
properties << '=';
|
||||||
@ -654,18 +666,6 @@ namespace data
|
|||||||
properties << ';';
|
properties << ';';
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
i = 0;
|
|
||||||
for (const auto& introducer: address.ssu->introducers)
|
|
||||||
{
|
|
||||||
if (introducer.iExp) // expiration is specified
|
|
||||||
{
|
|
||||||
WriteString ("iexp" + boost::lexical_cast<std::string>(i), properties);
|
|
||||||
properties << '=';
|
|
||||||
WriteString (boost::lexical_cast<std::string>(introducer.iExp), properties);
|
|
||||||
properties << ';';
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// write intro key
|
// write intro key
|
||||||
WriteString ("key", properties);
|
WriteString ("key", properties);
|
||||||
|
@ -744,6 +744,7 @@ namespace transport
|
|||||||
introducer.iPort = ep.port ();
|
introducer.iPort = ep.port ();
|
||||||
introducer.iTag = it1->GetRelayTag ();
|
introducer.iTag = it1->GetRelayTag ();
|
||||||
introducer.iKey = it1->GetIntroKey ();
|
introducer.iKey = it1->GetIntroKey ();
|
||||||
|
introducer.iExp = it1->GetCreationTime () + SSU_TO_INTRODUCER_SESSION_DURATION;
|
||||||
if (i2p::context.AddIntroducer (introducer))
|
if (i2p::context.AddIntroducer (introducer))
|
||||||
{
|
{
|
||||||
newList.push_back (ep);
|
newList.push_back (ep);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user