0
0
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:
James Yonan 2014-08-10 18:49:10 -06:00
parent 6a2bb7a229
commit c1f99a03be
2 changed files with 3 additions and 3 deletions

View File

@ -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());

View File

@ -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