|
|
@ -231,7 +231,7 @@ namespace transport |
|
|
|
session = std::make_shared<SSUSession> (*this, packet->from); |
|
|
|
session = std::make_shared<SSUSession> (*this, packet->from); |
|
|
|
session->WaitForConnect (); |
|
|
|
session->WaitForConnect (); |
|
|
|
(*sessions)[packet->from] = session; |
|
|
|
(*sessions)[packet->from] = session; |
|
|
|
LogPrint (eLogInfo, "SSU: new session from ", packet->from.address ().to_string (), ":", packet->from.port (), " created"); |
|
|
|
LogPrint (eLogDebug, "SSU: new session from ", packet->from.address ().to_string (), ":", packet->from.port (), " created"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
session->ProcessNextMessage (packet->buf, packet->len, packet->from); |
|
|
|
session->ProcessNextMessage (packet->buf, packet->len, packet->from); |
|
|
@ -312,7 +312,7 @@ namespace transport |
|
|
|
auto session = std::make_shared<SSUSession> (*this, remoteEndpoint, router, peerTest); |
|
|
|
auto session = std::make_shared<SSUSession> (*this, remoteEndpoint, router, peerTest); |
|
|
|
sessions[remoteEndpoint] = session; |
|
|
|
sessions[remoteEndpoint] = session; |
|
|
|
// connect
|
|
|
|
// connect
|
|
|
|
LogPrint (eLogInfo, "SSU: Creating new session to [", i2p::data::GetIdentHashAbbreviation (router->GetIdentHash ()), "] ", |
|
|
|
LogPrint (eLogDebug, "SSU: Creating new session to [", i2p::data::GetIdentHashAbbreviation (router->GetIdentHash ()), "] ", |
|
|
|
remoteEndpoint.address ().to_string (), ":", remoteEndpoint.port ()); |
|
|
|
remoteEndpoint.address ().to_string (), ":", remoteEndpoint.port ()); |
|
|
|
session->Connect (); |
|
|
|
session->Connect (); |
|
|
|
} |
|
|
|
} |
|
|
@ -364,10 +364,10 @@ namespace transport |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (introducerSession) // session found
|
|
|
|
if (introducerSession) // session found
|
|
|
|
LogPrint (eLogInfo, "SSU: Session to introducer already exists"); |
|
|
|
LogPrint (eLogWarning, "SSU: Session to introducer already exists"); |
|
|
|
else // create new
|
|
|
|
else // create new
|
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint (eLogInfo, "SSU: Creating new session to introducer"); |
|
|
|
LogPrint (eLogDebug, "SSU: Creating new session to introducer ", introducer->iHost); |
|
|
|
boost::asio::ip::udp::endpoint introducerEndpoint (introducer->iHost, introducer->iPort); |
|
|
|
boost::asio::ip::udp::endpoint introducerEndpoint (introducer->iHost, introducer->iPort); |
|
|
|
introducerSession = std::make_shared<SSUSession> (*this, introducerEndpoint, router); |
|
|
|
introducerSession = std::make_shared<SSUSession> (*this, introducerEndpoint, router); |
|
|
|
m_Sessions[introducerEndpoint] = introducerSession; |
|
|
|
m_Sessions[introducerEndpoint] = introducerSession; |
|
|
|