File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
connectivity/FEATURE_BLE/libraries/TARGET_CORDIO/source Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -326,13 +326,13 @@ ble_error_t PalGap::cancel_connection_creation(
326
326
peer_address_type_t peerAddressType,
327
327
const ble::address_t &peerAddress
328
328
) {
329
- for (uint8_t connection_id = 1 ; connection_id <= DM_CONN_MAX; connection_id++) {
329
+ for (uint8_t connection_id = 0 ; connection_id < DM_CONN_MAX; connection_id++) {
330
330
if (dmConnCb.ccb [connection_id].inUse &&
331
331
dmConnCb.ccb [connection_id].state == DM_CONN_SM_ST_CONNECTING &&
332
332
BdaCmp (dmConnCb.ccb [connection_id].peerAddr , peerAddress.data ())) {
333
333
DmConnClose (
334
334
DM_CLIENT_ID_APP,
335
- /* connection handle */ connection_id,
335
+ /* connection handle */ connection_id + 1 /* connection IDs start at 1 */ ,
336
336
/* reason - invalid (use success) */ 0x00
337
337
);
338
338
return BLE_ERROR_NONE;
You can’t perform that action at this time.
0 commit comments