File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ bool NimBLEClient::secureConnection() {
251251 }
252252
253253 ulTaskNotifyTake (pdTRUE, portMAX_DELAY);
254- } while (taskData.rc == BLE_HS_HCI_ERR ( BLE_ERR_PINKEY_MISSING) && retryCount--);
254+ } while (taskData.rc == (BLE_HS_ERR_HCI_BASE + BLE_ERR_PINKEY_MISSING) && retryCount--);
255255
256256 if (taskData.rc != 0 ){
257257 return false ;
@@ -827,12 +827,12 @@ uint16_t NimBLEClient::getMTU() {
827827 return 0 ;
828828 }
829829
830- if (event->enc_change .status == 0 || event->enc_change .status == BLE_HS_HCI_ERR ( BLE_ERR_PINKEY_MISSING)) {
830+ if (event->enc_change .status == 0 || event->enc_change .status == (BLE_HS_ERR_HCI_BASE + BLE_ERR_PINKEY_MISSING)) {
831831 struct ble_gap_conn_desc desc;
832832 rc = ble_gap_conn_find (event->enc_change .conn_handle , &desc);
833833 assert (rc == 0 );
834834
835- if (event->enc_change .status == BLE_HS_HCI_ERR ( BLE_ERR_PINKEY_MISSING)) {
835+ if (event->enc_change .status == (BLE_HS_ERR_HCI_BASE + BLE_ERR_PINKEY_MISSING)) {
836836 // Key is missing, try deleting.
837837 ble_store_util_delete_peer (&desc.peer_id_addr );
838838 } else if (NimBLEDevice::m_securityCallbacks != nullptr ) {
You can’t perform that action at this time.
0 commit comments