Skip to content

Commit 41d6c11

Browse files
committed
make sure server tunnel is published
1 parent e8f4c42 commit 41d6c11

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libi2pd/Destination.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ namespace client
139139
void SetLeaseSetUpdated ();
140140

141141
bool IsPublic () const { return m_IsPublic; };
142+
void SetPublic (bool pub) { m_IsPublic = pub; };
142143

143144
protected:
144145

libi2pd_client/ClientContext.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,10 @@ namespace client
713713
std::shared_ptr<ClientDestination> localDestination = nullptr;
714714
auto it = destinations.find (keys);
715715
if (it != destinations.end ())
716+
{
716717
localDestination = it->second;
718+
localDestination->SetPublic (true);
719+
}
717720
else
718721
{
719722
i2p::data::PrivateKeys k;
@@ -725,6 +728,8 @@ namespace client
725728
localDestination = CreateNewLocalDestination (k, true, &options);
726729
destinations[keys] = localDestination;
727730
}
731+
else
732+
localDestination->SetPublic (true);
728733
}
729734
if (type == I2P_TUNNELS_SECTION_TYPE_UDPSERVER)
730735
{

0 commit comments

Comments
 (0)