This is an automated email from the ASF dual-hosted git repository. naraj pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 8277e78a8ed033546723536befeba2127eb4c688 Author: MichaĆ Narajowski <[email protected]> AuthorDate: Wed Oct 2 10:54:56 2019 +0200 apps/bttester: Fix success response on L2CAP send data Send success response even when data is stalled because otherwise we cannot confirm a WID in auto-pts and the test case gets stalled. --- apps/bttester/src/l2cap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/bttester/src/l2cap.c b/apps/bttester/src/l2cap.c index 311d712..e30ef79 100644 --- a/apps/bttester/src/l2cap.c +++ b/apps/bttester/src/l2cap.c @@ -366,12 +366,9 @@ static void send_data(u8_t *data, u16_t len) os_mbuf_append(sdu_tx, cmd->data, data_len); + /* ble_l2cap_send takes ownership of the sdu */ rc = ble_l2cap_send(chan->chan, sdu_tx); - if (rc == BLE_HS_ESTALLED) { - /* Wait for TX_UNSTALLED event before sending response */ - /* ble_l2cap_send takes ownership of the sdu */ - return; - } else if (rc == 0) { + if (rc == 0 || rc == BLE_HS_ESTALLED) { tester_rsp(BTP_SERVICE_ID_L2CAP, L2CAP_SEND_DATA, CONTROLLER_INDEX, BTP_STATUS_SUCCESS); return;
