mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
differentiate garlic message received from tunnel and directly
This commit is contained in:
parent
4f1f08b805
commit
5997cb80bd
8 changed files with 19 additions and 16 deletions
|
@ -384,7 +384,8 @@ namespace ntcp
|
|||
if (m_ReceiveBufferOffset > 0)
|
||||
memcpy (m_ReceiveBuffer, nextBlock, m_ReceiveBufferOffset);
|
||||
}
|
||||
|
||||
|
||||
ScheduleTermination (); // reset termination timer
|
||||
Receive ();
|
||||
}
|
||||
}
|
||||
|
@ -423,7 +424,7 @@ namespace ntcp
|
|||
if (m_NextMessageOffset >= m_NextMessage->len + 4) // +checksum
|
||||
{
|
||||
// we have a complete I2NP message
|
||||
i2p::HandleI2NPMessage (m_NextMessage);
|
||||
i2p::HandleI2NPMessage (m_NextMessage, false);
|
||||
m_NextMessage = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -464,7 +465,6 @@ namespace ntcp
|
|||
|
||||
boost::asio::async_write (m_Socket, boost::asio::buffer (sendBuffer, l), boost::asio::transfer_all (),
|
||||
boost::bind(&NTCPSession::HandleSent, this, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred, msg));
|
||||
ScheduleTermination (); // reset termination timer
|
||||
}
|
||||
|
||||
void NTCPSession::HandleSent (const boost::system::error_code& ecode, std::size_t bytes_transferred, i2p::I2NPMessage * msg)
|
||||
|
@ -479,6 +479,7 @@ namespace ntcp
|
|||
else
|
||||
{
|
||||
LogPrint ("Msg sent: ", bytes_transferred);
|
||||
ScheduleTermination (); // reset termination timer
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue