moved garlic decryption to streaming thread

This commit is contained in:
orignal 2014-10-08 14:17:17 -04:00
parent 911ad52989
commit 375fceb530
6 changed files with 41 additions and 15 deletions

View file

@ -187,8 +187,7 @@ namespace stream
if (uncompressed->len <= MAX_PACKET_SIZE)
{
decompressor.Get (uncompressed->buf, uncompressed->len);
// then forward to streaming thread
m_Service.post (boost::bind (&StreamingDestination::HandleNextPacket, this, uncompressed));
HandleNextPacket (uncompressed);
}
else
{
@ -232,6 +231,16 @@ namespace stream
i2p::data::netdb.PublishLeaseSet (m_LeaseSet, m_Pool);
}
void StreamingDestination::ProcessGarlicMessage (I2NPMessage * msg)
{
m_Service.post (boost::bind (&StreamingDestination::HandleGarlicMessage, this, msg));
}
void StreamingDestination::ProcessDeliveryStatusMessage (I2NPMessage * msg)
{
m_Service.post (boost::bind (&StreamingDestination::HandleDeliveryStatusMessage, this, msg));
}
StreamingDestinations destinations;
void StreamingDestinations::Start ()
{