mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-05 21:04:49 +00:00
apps/bttester: remove unstalled_cb from btp_l2cap.c
Response to BTP_L2CAP_SEND_DATA command is already sent in command handler (`send_data()`). Sending further responses to already answered command is confusing - we cannot fail successful procedure retroactively. Data sending is already confirmed to be started successfully and no further responses are expected - more so, it appears to break `available_queue` management and further commands cannot be processed correctly. Similar callback may be proposed in the future if confirmation of sending data is needed, but not in form of BTP response, but BTP event.
This commit is contained in:
committed by
Szymon Janc
parent
601b1056aa
commit
4cf74c3bf5
@@ -140,19 +140,6 @@ recv_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
|
||||
tester_l2cap_coc_recv(chan, buf);
|
||||
}
|
||||
|
||||
static void
|
||||
unstalled_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
|
||||
int status, void *arg)
|
||||
{
|
||||
if (status) {
|
||||
tester_rsp(BTP_SERVICE_ID_L2CAP, BTP_L2CAP_SEND_DATA,
|
||||
BTP_STATUS_FAILED);
|
||||
} else {
|
||||
tester_rsp(BTP_SERVICE_ID_L2CAP, BTP_L2CAP_SEND_DATA,
|
||||
BTP_STATUS_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reconfigured_ev(uint16_t conn_handle, struct ble_l2cap_chan *chan,
|
||||
struct ble_l2cap_chan_info *chan_info,
|
||||
@@ -349,10 +336,6 @@ tester_l2cap_event(struct ble_l2cap_event *event, void *arg)
|
||||
(uint32_t) event->tx_unstalled.chan,
|
||||
event->tx_unstalled.conn_handle,
|
||||
event->tx_unstalled.status);
|
||||
|
||||
unstalled_cb(event->tx_unstalled.conn_handle,
|
||||
event->tx_unstalled.chan,
|
||||
event->tx_unstalled.status, arg);
|
||||
return 0;
|
||||
case BLE_L2CAP_EVENT_COC_RECONFIG_COMPLETED:
|
||||
if (ble_l2cap_get_chan_info(event->reconfigured.chan,
|
||||
|
||||
Reference in New Issue
Block a user