mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Make Bluetooth ACL channel searches skip over closed (invalid) channels. RFCOMM channels are considered invalid when the channel state is closed, not when the DLCI is zero - fix incorrect code.
This commit is contained in:
@@ -84,9 +84,14 @@ Bluetooth_Channel_t* Bluetooth_GetChannelData(const uint16_t SearchValue, const
|
||||
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
|
||||
{
|
||||
Bluetooth_Channel_t* ChannelData = &Bluetooth_Connection.Channels[i];
|
||||
|
||||
/* Closed channels should be ignored as they are not considered valid data */
|
||||
if (ChannelData->State == BT_Channel_Closed)
|
||||
continue;
|
||||
|
||||
bool FoundMatch = false;
|
||||
|
||||
/* Search the current channel for the search key to see if it matches */
|
||||
switch (SearchKey)
|
||||
{
|
||||
case CHANNEL_SEARCH_LOCALNUMBER:
|
||||
|
||||
Reference in New Issue
Block a user