mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
allocate actual RouterInfo's buffer size
This commit is contained in:
parent
f784cfad46
commit
7b9033d678
3 changed files with 40 additions and 19 deletions
|
@ -38,7 +38,7 @@ namespace data
|
|||
const char CAPS_FLAG_SSU_TESTING = 'B';
|
||||
const char CAPS_FLAG_SSU_INTRODUCER = 'C';
|
||||
|
||||
const int MAX_RI_BUFFER_SIZE = 2048;
|
||||
const int MAX_RI_BUFFER_SIZE = 2048; // if RouterInfo exceeds 2048 we consider it as malformed, might be changed later
|
||||
class RouterInfo: public RoutingDestination
|
||||
{
|
||||
public:
|
||||
|
@ -196,7 +196,7 @@ namespace data
|
|||
std::shared_ptr<RouterProfile> GetProfile () const;
|
||||
void SaveProfile () { if (m_Profile) m_Profile->Save (GetIdentHash ()); };
|
||||
|
||||
void Update (const uint8_t * buf, int len);
|
||||
void Update (const uint8_t * buf, size_t len);
|
||||
void DeleteBuffer () { delete[] m_Buffer; m_Buffer = nullptr; };
|
||||
bool IsNewer (const uint8_t * buf, size_t len) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue