Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CloneData with chained buffers in PacketBufferHandle #5348

Closed
yufengwangca opened this issue Mar 12, 2021 · 0 comments · Fixed by #5355
Closed

Support CloneData with chained buffers in PacketBufferHandle #5348

yufengwangca opened this issue Mar 12, 2021 · 0 comments · Fixed by #5355
Assignees

Comments

@yufengwangca
Copy link
Contributor

Problem

Currently, We Does NOT support chained buffers clone in PacketBufferHandle.
PacketBufferHandle CloneData(uint16_t aAdditionalSize = 0, uint16_t aReservedSize = PacketBuffer::kDefaultHeaderReserve);

Proposed Solution

Support CloneData with chained buffers in PacketBufferHandle

kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this issue Mar 12, 2021
#### Problem

It's sometimes useful to clone an entire packet buffer chain (e.g. project-chip#5309).

(If cloning only a single buffer is necessary,
 `NewWithData(buffer->Start(), buffer->DataLength(), 0, buffer->ReservedSize())`
 will do the job.)

#### Summary of Changes

Support chained buffers in `PacketBufferHandle::CloneData()`.

Fixes project-chip#5348 - Support CloneData with chained buffers in PacketBufferHandle
andy31415 pushed a commit that referenced this issue Mar 16, 2021
* Support chained buffers in PacketBufferHandle::CloneData()

#### Problem

It's sometimes useful to clone an entire packet buffer chain (e.g. #5309).

(If cloning only a single buffer is necessary,
 `NewWithData(buffer->Start(), buffer->DataLength(), 0, buffer->ReservedSize())`
 will do the job.)

#### Summary of Changes

Support chained buffers in `PacketBufferHandle::CloneData()`.

Fixes #5348 - Support CloneData with chained buffers in PacketBufferHandle

* Restyled by clang-format

* review fix

Co-authored-by: Restyled.io <commits@restyled.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants