From 013eccdf799ba1fa0364c9d8878872ccbf33da38 Mon Sep 17 00:00:00 2001 From: thekurtovic <40248206+thekurtovic@users.noreply.github.com> Date: Sun, 26 Jan 2025 15:02:22 -0500 Subject: [PATCH] Clean up --- .github/workflows/build.yml | 1 - src/NimBLERemoteCharacteristic.cpp | 11 ++++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a32875..b899463 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,6 @@ jobs: name: Build with ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }} runs-on: ubuntu-latest strategy: - fail-fast: false matrix: # The version names here correspond to the versions of espressif/idf Docker image. # See https://hub.docker.com/r/espressif/idf/tags and diff --git a/src/NimBLERemoteCharacteristic.cpp b/src/NimBLERemoteCharacteristic.cpp index 46e8f86..ff9b03a 100644 --- a/src/NimBLERemoteCharacteristic.cpp +++ b/src/NimBLERemoteCharacteristic.cpp @@ -103,18 +103,15 @@ bool NimBLERemoteCharacteristic::retrieveDescriptors(const NimBLEUUID* uuidFilte desc_filter_t filter = {uuidFilter, &taskData}; const uint16_t handle = getHandle(); const uint16_t svcHandle = getRemoteService()->getEndHandle(); + const uint16_t cltHandle = getClient()->getConnHandle(); - // If this is the last handle then there are no descriptors + // If this is the last handle then there are no more descriptors if (handle == svcHandle) { - NIMBLE_LOGD(LOG_TAG, "<< retrieveDescriptors(): found 0 descriptors."); + NIMBLE_LOGD(LOG_TAG, "<< retrieveDescriptors(): found %d descriptors.", m_vDescriptors.size()); return true; } - int rc = ble_gattc_disc_all_dscs(getClient()->getConnHandle(), - handle, - svcHandle, - NimBLERemoteCharacteristic::descriptorDiscCB, - &filter); + int rc = ble_gattc_disc_all_dscs(cltHandle, handle, svcHandle, descriptorDiscCB, &filter); if (rc != 0) { NIMBLE_LOGE(LOG_TAG, "ble_gattc_disc_all_dscs: rc=%d %s", rc, NimBLEUtils::returnCodeToString(rc)); return false;