From 7b6d6c3e137d8dfe859a74b41474488503d1c53c Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Wed, 24 Apr 2024 00:09:55 +0530 Subject: [PATCH] address reviews --- examples/platform/esp32/common/Esp32AppServer.cpp | 2 +- src/platform/ESP32/nimble/BLEManagerImpl.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/platform/esp32/common/Esp32AppServer.cpp b/examples/platform/esp32/common/Esp32AppServer.cpp index b2e968d638e85a..4f854c518bd01f 100644 --- a/examples/platform/esp32/common/Esp32AppServer.cpp +++ b/examples/platform/esp32/common/Esp32AppServer.cpp @@ -111,7 +111,7 @@ static size_t hex_string_to_binary(const char * hex_string, uint8_t * buf, size_ void Esp32AppServer::DeInitBLEIfCommissioned(void) { -#if CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING +#ifdef CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING if (chip::Server::GetInstance().GetFabricTable().FabricCount() > 0) { chip::DeviceLayer::Internal::BLEMgr().Shutdown(); diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp index 9325513e74bbe8..9add175b9e6e42 100644 --- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp +++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp @@ -257,7 +257,7 @@ void BLEManagerImpl::_Shutdown() BleLayer::Shutdown(); xTimerDelete(sbleAdvTimeoutTimer, portMAX_DELAY); - // selectively setting kGATTServiceStarted flag, in order to notify the state machine to stop the CHIPoBLE gatt service + // selectively setting kGATTServiceStarted flag, in order to notify the state machine to stop the CHIPoBLE GATT service mFlags.ClearAll().Set(Flags::kGATTServiceStarted); mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Disabled; @@ -1017,7 +1017,7 @@ void BLEManagerImpl::ClaimBLEMemory(System::Layer *, void *) VerifyOrReturn(err == ESP_OK, ChipLogError(DeviceLayer, "BLE deinit failed")); ChipLogProgress(DeviceLayer, "BLE deinit successful and memory reclaimed"); - // TODO: PostEvent(DeviceEventType::kBLEDeinitialized); + // TODO: post an event when ble is deinitialized and memory is added to heap } }