Bluetooth: Fix leaving empty header space in ACL fragments

The outgoing fragments don't need to reserve space for the L2CAP
header since we're copying from an original buffer that already has
this header (and continuation fragments don't have it a all).

Change-Id: I3ce18bf45f2a31f5ab3db395a506e35aa246762b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-11-06 09:35:46 +02:00 committed by Anas Nashif
commit 1ba3350157

View file

@ -377,7 +377,7 @@ static struct net_buf *create_frag(struct bt_conn *conn, struct net_buf *buf)
{ {
struct net_buf *frag; struct net_buf *frag;
frag = bt_l2cap_create_pdu(&frag_buf); frag = bt_conn_create_pdu(&frag_buf, 0);
if (conn->state != BT_CONN_CONNECTED) { if (conn->state != BT_CONN_CONNECTED) {
if (frag) { if (frag) {
net_buf_unref(frag); net_buf_unref(frag);