commit | 1e65a08c3acb58867464ebe042134bc25e9837db | [log] [tgz] |
---|---|---|
author | mukesh agrawal <quiche@google.com> | Wed Feb 06 14:24:21 2019 -0800 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Mon Feb 11 22:51:49 2019 +0000 |
tree | 23131bc107ffa0ac7e14526b860b7a1221d6c2e9 | |
parent | 0585ff30cd62f2c044a0dec2164050108fe3d289 [diff] |
[bt][l2cap] PDU: allow Copy()-ing zero bytes As part of the upcoming L2CAP channel modes support, we'll need to support segmentation and reassembly. And to support segmentation and reassembly, we need to make PDUs and SDUs distinct entities. After some discussion (see BT-61), we decided to represent SDUs as simple ByteBuffers, rather than something more complicated (e.g. linked-list of PDUs). This means that the Channel object will soon provide a ByteBuffer when it calls |rx_callback|, rather than a PDU. Since various existing |rx_callback|s expect to be able to receive a PDU with an empty body, we need to support passing an empty L2CAP frame body up as a ByteBuffer. To that end, remove the assertion in PDU::Copy(), which requires that the PDU have non-zero bytes available past |pos|. Bug: BT-716 Test: fx run-test bluetooth-tests -t bt-host-unittests Change-Id: I62f467b4c39f46e31b97475ed5a3910ce28ba887
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
See Getting Started.
See the documentation.