[BREAKING] - Remove ignore list.

This removes the ignore list feature as it can be implemented by the application if desired.
The scan will now ignore any device we are connected to already by checking for any connected client with the same peer address.
This commit is contained in:
h2zero
2024-11-23 18:31:34 -07:00
committed by h2zero
parent 2151386057
commit 1b0abd273f
5 changed files with 6 additions and 61 deletions

View File

@@ -946,8 +946,6 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
NIMBLE_LOGD(LOG_TAG, "disconnect; reason=%d, %s", rc, NimBLEUtils::returnCodeToString(rc));
pClient->m_terminateFailCount = 0;
NimBLEDevice::removeIgnored(pClient->m_peerAddress);
// Don't call the disconnect callback if we are waiting for a connection to complete and it fails
if (rc != (BLE_HS_ERR_HCI_BASE + BLE_ERR_CONN_ESTABLISHMENT) || pClient->m_config.asyncConnect) {
pClient->m_pClientCallbacks->onDisconnect(pClient, rc);
@@ -985,10 +983,6 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
break;
}
}
// In the case of a multi-connecting device we ignore this device when
// scanning since we are already connected to it
NimBLEDevice::addIgnored(pClient->m_peerAddress);
} else {
pClient->m_connHandle = BLE_HS_CONN_HANDLE_NONE;
if (!pClient->m_config.asyncConnect) {