1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-11 13:27:52 +00:00

alignment

This commit is contained in:
orignal 2014-11-26 21:42:14 -05:00
parent eb6b04d6c2
commit a8c08563f1
2 changed files with 2 additions and 1 deletions

View File

@ -45,8 +45,8 @@ namespace stream
struct Packet
{
uint8_t buf[MAX_PACKET_SIZE];
size_t len, offset;
uint8_t buf[MAX_PACKET_SIZE];
int numResendAttempts;
Packet (): len (0), offset (0), numResendAttempts (0) {};

View File

@ -132,6 +132,7 @@ namespace tunnel
void TunnelGatewayBuffer::CreateCurrentTunnelDataMessage ()
{
m_CurrentTunnelDataMsg = NewI2NPMessage ();
m_CurrentTunnelDataMsg->Align (12);
// we reserve space for padding
m_CurrentTunnelDataMsg->offset += TUNNEL_DATA_MSG_SIZE + sizeof (I2NPHeader);
m_CurrentTunnelDataMsg->len = m_CurrentTunnelDataMsg->offset;