mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-21 20:50:55 +01:00
Remove address from whitelist if the procedure fails.
This prevents a situation where the whitelist contains the address but the procedure errors and the address cannot be added again.
This commit is contained in:
parent
aeb4334e98
commit
ef90a8aa95
1 changed files with 1 additions and 0 deletions
|
@ -691,6 +691,7 @@ bool NimBLEDevice::whiteListAdd(const NimBLEAddress & address) {
|
|||
int rc = ble_gap_wl_set(&wlVec[0], wlVec.size());
|
||||
if (rc != 0) {
|
||||
NIMBLE_LOGE(LOG_TAG, "Failed adding to whitelist rc=%d", rc);
|
||||
m_whiteList.pop_back();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue