mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
double size tunnel message
This commit is contained in:
parent
b9476791f4
commit
66422d6d83
|
@ -38,7 +38,8 @@ namespace i2p
|
||||||
|
|
||||||
std::shared_ptr<I2NPMessage> NewI2NPTunnelMessage ()
|
std::shared_ptr<I2NPMessage> NewI2NPTunnelMessage ()
|
||||||
{
|
{
|
||||||
auto msg = new I2NPMessageBuffer<i2p::tunnel::TUNNEL_DATA_MSG_SIZE + I2NP_HEADER_SIZE + 34>(); // reserved for alignment and NTCP 16 + 6 + 12
|
// should fit two tunnel message, enough for one garlic encrypted streaming packet
|
||||||
|
auto msg = new I2NPMessageBuffer<2*i2p::tunnel::TUNNEL_DATA_MSG_SIZE + I2NP_HEADER_SIZE + 34>(); // reserved for alignment and NTCP 16 + 6 + 12
|
||||||
msg->Align (12);
|
msg->Align (12);
|
||||||
return std::shared_ptr<I2NPMessage>(msg);
|
return std::shared_ptr<I2NPMessage>(msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,7 @@ namespace tunnel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "TunnelMessage: First fragment of message ", msgID, " not found, saved");
|
LogPrint (eLogDebug, "TunnelMessage: First fragment of message ", msgID, " not found, saved");
|
||||||
AddOutOfSequenceFragment (msgID, fragmentNum, isLastFragment, fragment, size);
|
AddOutOfSequenceFragment (msgID, fragmentNum, isLastFragment, fragment, size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -283,6 +283,7 @@ namespace tunnel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_IncompleteMessages.erase (msgID);
|
m_IncompleteMessages.erase (msgID);
|
||||||
|
LogPrint (eLogDebug, "TunnelMessage: All fragments of message ", msgID, " found");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue