|
|
|
@ -426,14 +426,6 @@ namespace transport
@@ -426,14 +426,6 @@ namespace transport
|
|
|
|
|
auto address = peer.router->GetNTCPAddress (!context.SupportsV6 ()); |
|
|
|
|
if (address && m_NTCPServer) |
|
|
|
|
{ |
|
|
|
|
#if BOOST_VERSION >= 104900 |
|
|
|
|
if (!address->host.is_unspecified ()) // we have address now
|
|
|
|
|
#else |
|
|
|
|
boost::system::error_code ecode; |
|
|
|
|
address->host.to_string (ecode); |
|
|
|
|
if (!ecode) |
|
|
|
|
#endif |
|
|
|
|
{ |
|
|
|
|
if (!peer.router->UsesIntroducer () && !peer.router->IsUnreachable ()) |
|
|
|
|
{ |
|
|
|
|
if(!m_NTCPServer->ShouldLimit()) |
|
|
|
@ -459,7 +451,6 @@ namespace transport
@@ -459,7 +451,6 @@ namespace transport
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
LogPrint (eLogDebug, "Transports: NTCP address is not present for ", i2p::data::GetIdentHashAbbreviation (ident), ", trying SSU"); |
|
|
|
|
} |
|
|
|
@ -469,19 +460,10 @@ namespace transport
@@ -469,19 +460,10 @@ namespace transport
|
|
|
|
|
if (m_SSUServer && peer.router->IsSSU (!context.SupportsV6 ())) |
|
|
|
|
{ |
|
|
|
|
auto address = peer.router->GetSSUAddress (!context.SupportsV6 ()); |
|
|
|
|
#if BOOST_VERSION >= 104900 |
|
|
|
|
if (!address->host.is_unspecified ()) // we have address now
|
|
|
|
|
#else |
|
|
|
|
boost::system::error_code ecode; |
|
|
|
|
address->host.to_string (ecode); |
|
|
|
|
if (!ecode) |
|
|
|
|
#endif |
|
|
|
|
{ |
|
|
|
|
m_SSUServer->CreateSession (peer.router, address->host, address->port); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
LogPrint (eLogInfo, "Transports: No NTCP or SSU addresses available"); |
|
|
|
|
peer.Done (); |
|
|
|
|
std::unique_lock<std::mutex> l(m_PeersMutex); |
|
|
|
|