Browse Source

alignment

pull/113/head
orignal 10 years ago
parent
commit
a8c08563f1
  1. 2
      Streaming.h
  2. 1
      TunnelGateway.cpp

2
Streaming.h

@ -45,8 +45,8 @@ namespace stream @@ -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) {};

1
TunnelGateway.cpp

@ -132,6 +132,7 @@ namespace tunnel @@ -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;

Loading…
Cancel
Save