Browse Source

publish iexp

pull/1656/head
orignal 4 years ago
parent
commit
df858d9143
  1. 24
      libi2pd/RouterInfo.cpp
  2. 1
      libi2pd/SSU.cpp

24
libi2pd/RouterInfo.cpp

@ -617,6 +617,18 @@ namespace data @@ -617,6 +617,18 @@ namespace data
{
int 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++;
}
i = 0;
for (const auto& introducer: address.ssu->introducers)
{
WriteString ("ihost" + boost::lexical_cast<std::string>(i), properties);
properties << '=';
@ -654,18 +666,6 @@ namespace data @@ -654,18 +666,6 @@ namespace data
properties << ';';
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
WriteString ("key", properties);

1
libi2pd/SSU.cpp

@ -744,6 +744,7 @@ namespace transport @@ -744,6 +744,7 @@ namespace transport
introducer.iPort = ep.port ();
introducer.iTag = it1->GetRelayTag ();
introducer.iKey = it1->GetIntroKey ();
introducer.iExp = it1->GetCreationTime () + SSU_TO_INTRODUCER_SESSION_DURATION;
if (i2p::context.AddIntroducer (introducer))
{
newList.push_back (ep);

Loading…
Cancel
Save