mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
allocate RouterInfo's buffer from pool
This commit is contained in:
parent
a723405fb0
commit
ae26758170
|
@ -49,7 +49,7 @@ namespace data
|
||||||
m_Caps (0), m_Version (0), m_Congestion (eLowCongestion)
|
m_Caps (0), m_Version (0), m_Congestion (eLowCongestion)
|
||||||
{
|
{
|
||||||
m_Addresses = AddressesPtr(new Addresses ()); // create empty list
|
m_Addresses = AddressesPtr(new Addresses ()); // create empty list
|
||||||
m_Buffer = NewBuffer (); // always RouterInfo's
|
m_Buffer = RouterInfo::NewBuffer (); // always RouterInfo's
|
||||||
ReadFromFile (fullPath);
|
ReadFromFile (fullPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ namespace data
|
||||||
}
|
}
|
||||||
|
|
||||||
RouterInfo::RouterInfo (const uint8_t * buf, size_t len):
|
RouterInfo::RouterInfo (const uint8_t * buf, size_t len):
|
||||||
RouterInfo (std::make_shared<Buffer> (buf, len), len)
|
RouterInfo (netdb.NewRouterInfoBuffer (buf, len), len)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue