mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-06 17:20:04 +00:00
app/bttester: do not send L2CAP disconnection event if error in connect
There is a little need of sending such event: created connection is confirmed connection event; if no such event is received, the connection can be considered not established. Disconnected event shall be sent only for disconnection. By removing disconnected_cb call on connect error we avoid calling it for not established channel, for example when DCID in connection response was a duplicate of already connected one. This would trigger the assert `assert(channel != NULL);`.
This commit is contained in:
committed by
Krzysztof Kopyściński
parent
d7c18041d7
commit
5b6352364b
@@ -259,8 +259,6 @@ tester_l2cap_event(struct ble_l2cap_event *event, void *arg)
|
||||
|
||||
if (event->connect.status) {
|
||||
console_printf("LE COC error: %d\n", event->connect.status);
|
||||
disconnected_cb(event->connect.conn_handle,
|
||||
event->connect.chan, &chan_info, arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user