|
|
|
@ -12,8 +12,6 @@ namespace tunnel
@@ -12,8 +12,6 @@ namespace tunnel
|
|
|
|
|
{ |
|
|
|
|
TunnelGatewayBuffer::~TunnelGatewayBuffer () |
|
|
|
|
{ |
|
|
|
|
for (auto it: m_TunnelDataMsgs) |
|
|
|
|
DeleteI2NPMessage (it); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void TunnelGatewayBuffer::PutI2NPMsg (const TunnelMessageBlock& block) |
|
|
|
@ -138,7 +136,7 @@ namespace tunnel
@@ -138,7 +136,7 @@ namespace tunnel
|
|
|
|
|
|
|
|
|
|
void TunnelGatewayBuffer::CreateCurrentTunnelDataMessage () |
|
|
|
|
{ |
|
|
|
|
m_CurrentTunnelDataMsg = NewI2NPShortMessage (); |
|
|
|
|
m_CurrentTunnelDataMsg = ToSharedI2NPMessage (NewI2NPShortMessage ()); |
|
|
|
|
m_CurrentTunnelDataMsg->Align (12); |
|
|
|
|
// we reserve space for padding
|
|
|
|
|
m_CurrentTunnelDataMsg->offset += TUNNEL_DATA_MSG_SIZE + I2NP_HEADER_SIZE; |
|
|
|
@ -192,8 +190,8 @@ namespace tunnel
@@ -192,8 +190,8 @@ namespace tunnel
|
|
|
|
|
auto tunnelMsgs = m_Buffer.GetTunnelDataMsgs (); |
|
|
|
|
for (auto tunnelMsg : tunnelMsgs) |
|
|
|
|
{ |
|
|
|
|
m_Tunnel->EncryptTunnelMsg (tunnelMsg); |
|
|
|
|
FillI2NPMessageHeader (tunnelMsg, eI2NPTunnelData); |
|
|
|
|
m_Tunnel->EncryptTunnelMsg (tunnelMsg.get ()); // TODO:
|
|
|
|
|
FillI2NPMessageHeader (tunnelMsg.get (), eI2NPTunnelData); // TODO:
|
|
|
|
|
m_NumSentBytes += TUNNEL_DATA_MSG_SIZE; |
|
|
|
|
} |
|
|
|
|
i2p::transport::transports.SendMessages (m_Tunnel->GetNextIdentHash (), tunnelMsgs); |
|
|
|
|