mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-09 21:45:54 +00:00
ignore failed connections in SM
This commit is contained in:
parent
da0af357c3
commit
efc37b8e26
3
ble/sm.c
3
ble/sm.c
@ -1280,6 +1280,9 @@ static void sm_event_packet_handler (void * connection, uint8_t packet_type, uin
|
|||||||
case HCI_EVENT_LE_META:
|
case HCI_EVENT_LE_META:
|
||||||
switch (packet[2]) {
|
switch (packet[2]) {
|
||||||
case HCI_SUBEVENT_LE_CONNECTION_COMPLETE:
|
case HCI_SUBEVENT_LE_CONNECTION_COMPLETE:
|
||||||
|
|
||||||
|
if (packet[3]) return; // connection failed
|
||||||
|
|
||||||
// only single connection for peripheral
|
// only single connection for peripheral
|
||||||
if (sm_response_handle){
|
if (sm_response_handle){
|
||||||
printf("Already connected, ignoring incoming connection\n");
|
printf("Already connected, ignoring incoming connection\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user