fix code syle(spaces->tabs, tabulations)

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2020-03-01 13:25:50 +03:00
parent 78640532e1
commit 44f6683c41
115 changed files with 3206 additions and 3161 deletions

View file

@ -26,7 +26,7 @@ namespace transport
{
std::shared_ptr<NTCPSession> session;
};
NTCPSession::NTCPSession (NTCPServer& server, std::shared_ptr<const i2p::data::RouterInfo> in_RemoteRouter):
TransportSession (in_RemoteRouter, NTCP_ESTABLISH_TIMEOUT),
m_Server (server), m_Socket (m_Server.GetService ()),
@ -468,7 +468,7 @@ namespace transport
LogPrint (eLogError, "NTCP: Phase 4 read error: ", ecode.message (), ". Check your clock");
if (ecode != boost::asio::error::operation_aborted)
{
// this router doesn't like us
// this router doesn't like us
i2p::data::netdb.SetUnreachable (GetRemoteIdentity ()->GetIdentHash (), true);
Terminate ();
}
@ -736,13 +736,11 @@ namespace transport
}
}
void NTCPSession::SendTimeSyncMessage ()
{
Send (nullptr);
}
void NTCPSession::SendI2NPMessages (const std::vector<std::shared_ptr<I2NPMessage> >& msgs)
{
m_Server.GetService ().post (std::bind (&NTCPSession::PostI2NPMessages, shared_from_this (), msgs));
@ -821,8 +819,8 @@ namespace transport
{
m_NTCPAcceptor = new boost::asio::ip::tcp::acceptor (m_Service, boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), address->port));
LogPrint (eLogInfo, "NTCP: Start listening v6 TCP port ", address->port);
}
catch ( std::exception & ex )
}
catch ( std::exception & ex )
{
/** fail to bind ip4 */
LogPrint(eLogError, "NTCP: Failed to bind to v4 port ", address->port, ": ", ex.what());
@ -848,8 +846,8 @@ namespace transport
LogPrint (eLogInfo, "NTCP: Start listening v6 TCP port ", address->port);
auto conn = std::make_shared<NTCPSession> (*this);
m_NTCPV6Acceptor->async_accept(conn->GetSocket (), std::bind (&NTCPServer::HandleAcceptV6, this, conn, std::placeholders::_1));
}
catch ( std::exception & ex )
}
catch ( std::exception & ex )
{
LogPrint(eLogError, "NTCP: failed to bind to v6 port ", address->port, ": ", ex.what());
ThrowFatal (eLogError, "Unable to start IPv6 NTCP transport at port ", address->port, ": ", ex.what ());
@ -904,7 +902,6 @@ namespace transport
}
}
void NTCPServer::Run ()
{
while (m_IsRunning)