mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-07 07:44:13 +00:00
fixed race condition
This commit is contained in:
parent
17725acda2
commit
ccbc4353d6
9
SSU.cpp
9
SSU.cpp
@ -690,6 +690,11 @@ namespace ssu
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SSUSession::SendI2NPMessage (I2NPMessage * msg)
|
void SSUSession::SendI2NPMessage (I2NPMessage * msg)
|
||||||
|
{
|
||||||
|
m_Server.GetService ().post (boost::bind (&SSUSession::PostI2NPMessage, this, msg));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SSUSession::PostI2NPMessage (I2NPMessage * msg)
|
||||||
{
|
{
|
||||||
if (msg)
|
if (msg)
|
||||||
{
|
{
|
||||||
@ -698,8 +703,8 @@ namespace ssu
|
|||||||
else
|
else
|
||||||
m_DelayedMessages.push_back (msg);
|
m_DelayedMessages.push_back (msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSUSession::ProcessData (uint8_t * buf, size_t len)
|
void SSUSession::ProcessData (uint8_t * buf, size_t len)
|
||||||
{
|
{
|
||||||
m_Data.ProcessMessage (buf, len);
|
m_Data.ProcessMessage (buf, len);
|
||||||
|
1
SSU.h
1
SSU.h
@ -81,6 +81,7 @@ namespace ssu
|
|||||||
|
|
||||||
void CreateAESandMacKey (const uint8_t * pubKey);
|
void CreateAESandMacKey (const uint8_t * pubKey);
|
||||||
|
|
||||||
|
void PostI2NPMessage (I2NPMessage * msg);
|
||||||
void ProcessMessage (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint); // call for established session
|
void ProcessMessage (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint); // call for established session
|
||||||
void ProcessSessionRequest (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint);
|
void ProcessSessionRequest (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint);
|
||||||
void SendSessionRequest ();
|
void SendSessionRequest ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user