diff options
author | Dean Camera <[email protected]> | 2010-06-26 15:07:13 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-06-26 15:07:13 +0000 |
commit | b6565404685fbac1698d256823abdbdb3d3ddaff (patch) | |
tree | 441d18429db23b2b4235122071de8a347fa69e4a /Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c | |
parent | d29a408ffd906b537bcdce2a0cd98827ea5c27e3 (diff) | |
download | qmk_firmware-b6565404685fbac1698d256823abdbdb3d3ddaff.tar.gz qmk_firmware-b6565404685fbac1698d256823abdbdb3d3ddaff.zip |
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.
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c')
-rw-r--r-- | Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c index 1a667987b3..07d867b4b8 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c @@ -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: |