variable length buffer for LeaseSet

This commit is contained in:
orignal 2015-04-08 09:39:02 -04:00
parent e9edc7b205
commit 9ce9d9b7fc
2 changed files with 15 additions and 7 deletions

View file

@ -36,11 +36,10 @@ namespace data
{
public:
LeaseSet (const uint8_t * buf, int len);
LeaseSet (const LeaseSet& ) = default;
LeaseSet (const uint8_t * buf, size_t len);
LeaseSet (const i2p::tunnel::TunnelPool& pool);
LeaseSet& operator=(const LeaseSet& ) = default;
void Update (const uint8_t * buf, int len);
~LeaseSet () { delete[] m_Buffer; };
void Update (const uint8_t * buf, size_t len);
const IdentityEx& GetIdentity () const { return m_Identity; };
const uint8_t * GetBuffer () const { return m_Buffer; };
@ -64,7 +63,7 @@ namespace data
std::vector<Lease> m_Leases;
IdentityEx m_Identity;
uint8_t m_EncryptionKey[256];
uint8_t m_Buffer[MAX_LS_BUFFER_SIZE];
uint8_t * m_Buffer;
size_t m_BufferLen;
};
}