Skip to content

Commit 5b63523

Browse files
committed
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);`.
1 parent d7c1804 commit 5b63523

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

apps/bttester/src/l2cap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,6 @@ tester_l2cap_event(struct ble_l2cap_event *event, void *arg)
259259

260260
if (event->connect.status) {
261261
console_printf("LE COC error: %d\n", event->connect.status);
262-
disconnected_cb(event->connect.conn_handle,
263-
event->connect.chan, &chan_info, arg);
264262
return 0;
265263
}
266264

0 commit comments

Comments
 (0)