mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 04:02:15 +02:00
In Frame::Context, rename alloc_with_data() to copy().
This commit is contained in:
parent
6a2bb7a229
commit
c1f99a03be
@ -113,8 +113,8 @@ namespace openvpn {
|
||||
buf.realign(actual_headroom(buf.c_data_raw()));
|
||||
}
|
||||
|
||||
// Return a new BufferAllocated object initialized with the given data
|
||||
BufferPtr alloc_with_data(const unsigned char *data, const size_t size) const
|
||||
// Return a new BufferAllocated object initialized with the given data.
|
||||
BufferPtr copy(const unsigned char *data, const size_t size) const
|
||||
{
|
||||
const size_t cap = size + headroom() + tailroom();
|
||||
BufferPtr b = new BufferAllocated(cap, buffer_flags());
|
||||
|
@ -49,7 +49,7 @@ namespace openvpn {
|
||||
if (frame_)
|
||||
{
|
||||
const Frame::Context& fc = (*frame_)[Frame::READ_BIO_MEMQ_STREAM];
|
||||
q.push_back(fc.alloc_with_data(data, size));
|
||||
q.push_back(fc.copy(data, size));
|
||||
length += size;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user