From 3247293801caed915f4ce292e49d439aef94ca99 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Tue, 4 Apr 2023 03:44:30 +0530 Subject: [PATCH] [ESP32] Fixed lock app crash (#25895) * [ESP32] Fixed lock app crash * Used RAII lock --- examples/lock-app/esp32/main/AppTask.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp index a9fc2c35cdbd86..27aad563daa613 100644 --- a/examples/lock-app/esp32/main/AppTask.cpp +++ b/examples/lock-app/esp32/main/AppTask.cpp @@ -59,7 +59,6 @@ StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; using namespace ::chip::DeviceLayer; using namespace ::chip::System; -// using namespace ESP32DoorLock::LockInitParams; AppTask AppTask::sAppTask; @@ -86,6 +85,8 @@ CHIP_ERROR AppTask::Init() (void *) this, // init timer id = app task obj context TimerEventHandler // timer callback handler ); + + chip::DeviceLayer::StackLock lock; CHIP_ERROR err = BoltLockMgr().InitLockState(); BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted);