From e0780573cb92fd10c26f73b1498742c2da8ea256 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 11 Apr 2018 12:38:31 +0200 Subject: [PATCH] l2cap: fix warning about non-existant connection with hande 0x000 --- src/l2cap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/l2cap.c b/src/l2cap.c index 5c65bf352..a7fc9ad1d 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -1497,6 +1497,7 @@ static void l2cap_run(void){ #ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE // send s-frame to acknowledge received packets + if (channel->con_handle == HCI_CON_HANDLE_INVALID) continue; if (!hci_can_send_acl_packet_now(channel->con_handle)) continue; if (channel->tx_send_index != channel->tx_write_index){ @@ -1785,7 +1786,7 @@ static l2cap_channel_t * l2cap_create_channel_entry(btstack_packet_handler_t pac // channel->local_cid = l2cap_next_local_cid(); - channel->con_handle = 0; + channel->con_handle = HCI_CON_HANDLE_INVALID; // set initial state channel->state = L2CAP_STATE_WILL_SEND_CREATE_CONNECTION;